Thursday, April 28, 2011

Convert It

I'm glad to inform you about publishing the unit conversion application called Convert It.
The main reason was to have a simple unit converter without necessity of navigating through a lot of screens to set parameters for converting needed units, like it is for almost all such applications.

Next are a little description:
  • Nothing extra. Only the categories and units that are used in everyday life.
  • A simple interface allows you to select all the options you want, without using additional screens.
  • There is an ability to copy and paste the data from the clipboard.
  • Support for Ukrainian, English and Russian languages. Using the current system language (English by default).
It has been not finished yet. It is the initial version, and I have a lot of ideas how to improve it. Also I'd like to get feedback from users to make it more useful.

You can download it from the Android Market.

PS I'm going to describe the technical part in details in the next posts.

    Thursday, January 27, 2011

    Android wheel update: custom views for items

    I'm glad to inform you about updating the wheel control. There has been implemented the main feature for this widget - the ability for using  custom views for wheel items, like in the ListView control.

    Now it is possible to show anything in the wheel, as simple text items

    ... as images

    Looks nice :)

    How to use
    For simple text items there can be used ArrayWheelAdapter and ArrayWheelAdapter adapters, like before. They work also with user defined layouts for items and the wheel label.
    For complex wheel items there should be used user defined adapters by implementing the WheelViewAdapter interface. For text based adapters there can be used the AbstractWheelAdapter class as a base.


    All wheel items should have the same height to be corrected rendered. The label height should be less than the height of wheel item.
    The label width should not be so big since items are show in the rest area.

    Backward compatibility
    All application using the wheel should work with new adapters, but with small fix: ArrayWheelAdapter and ArrayWheelAdapter adapters have been moved to the kankan.wheel.widget.adapters package.
    The old WheelAdapter interface has been set as deprecated and will be removed in next builds, with  corresponding WheelView methods. There should be used the WheelViewAdapter interface instead.

    Tuesday, January 18, 2011

    Scrolling inside ScrollView

    There was an issue with wheel view related to the scrolling functionality. It did not work if wheel is placed inside a ScrollView.

    I've investigated standard controls and found a one that does work alike (multiline EditText) and a one working as expected (SeekBar). I would like to check also ScrollView inside a ScrollView, but fortunately I did find a solution for this issue only by using SeekBar sources from Android SDK (I have old ones, but it was enough).

    The main problem was with WheelView.onTouchEvent() - it did not receive all touch events because they were processed by parent (scroll view). So it needed to ask the ScrollView to skip touch events and allow the wheel to perform them by onTouchEvent(). There is a corresponding method for a parent view called ViewParent.requestDisallowInterceptTouchEvent(). SeekBar calls it during handling the ACTION_MOVE touch event action. I've added this approach to the wheel view and it works too! :)

    public boolean onTouchEvent(MotionEvent event) {
        if (getViewAdapter() == null) {
            return true;
        if (!gestureDetector.onTouchEvent(event) && event.getAction() == MotionEvent.ACTION_UP) {
        // Fix scrolling
        if (event.getAction() == MotionEvent.ACTION_MOVE && getParent() != null) {
        return true;

    I'm unable to commit this fix now because of working on custom views for wheel items; will do that later. So please fix your code manually. Thanks!

    Thursday, November 25, 2010

    Android wheel update: animation

    The wheel widget has been updated. There has been added the main feature - animation.
    Now it is possible to scroll the wheel automatically by using the finger fling.
    In the same way there is the ability to scroll the wheel programmatically by using next methods:
    • void setCurrentItem(int index, boolean animated) - scrolls to specified items if animated is true
    • void scroll(int itemsToScroll, int time) - scrolls up/down by itemsToScroll items
    The main feature that is not implemented at this moment is custom views for wheel items. It will be implemented soon.

    Friday, November 19, 2010

    Weather forecast widget: Weather providers

    The one of main parts of weather forecast widget is communication with weather provider.

    I have found next providers (please let me know if you know another ones) that work only with the US cities (except Google weather):

    Friday, November 12, 2010

    Project for beginners

    The main problem for beginners is to choose a project to learn Android. It needs to invent a test app for each topic from Android SDK Developer's Guide. And as a result there are lots projects that in general don't have any value.

    It would be better to choose a one project that covers as much as possible items from Android SDK. A one of good project that helps learning Android is the Weather forecast App widget.

    There can be covered next items:
    • App Widgets
    • User Interface (layouts, menus, dialogs etc.)
    • Resources (drawables, stings, styles & themes)
    • Intents
    • Content Providers
    • XML and Web servers (weather providers)

    Saturday, October 30, 2010

    Android wheel update: scrolling

    I'm glad to inform that the Android wheel widget has been updated.
    Now scrolling feature looks more user friendly and the wheel is updated smoothly, like expected.

    I've also renamed methods of the scrolling listener interface to make them clear to understand. They are called now onScrollingStarted() and onScrollingFinished().

    The next feature planned to be added is the animation. It is the main feature of Wheel control, and in the same time it is the most difficult to implement. So, it requires some time to be done, and I hope I will have enough time to do that.

    BTW, some people try to implement the animation,  moreover, there is an job offer that asks to implement the animation for the money :)
    Unfortunately, I'm not able to do that as quick as expected, so they could wait for 1-2 months until I implement that.