I built another Android app: a bmi calculator. I spent a lot more time with it than I would have thought in the beginning. Basically I learned how to build a custom component with custom attributes and how to use an alternative layout for landscape view. I also learned to use the very good compatibility library ActionBarSherlock. Then I didn’t use any of those.
The custom component didn’t end up making sense as mostly it was an EditText in RelativeLayout’s clothes with couple of labels tacked on. In the end there wasn’t the screen real estate for the labels. Landscape view proved to be somewhat too difficult to get working with different screen sizes while in confines of one Activity. I used ActionBarSherlock mainly for the ActionBar. In the end I had to ditch it because the final installation of the app would have been over three times as large with ActionBarSherlock. Also ActionBar itself is easy to implement as a glorified TitleBar when you choose a titlebar-hiding theme as basis and roll your own.
Anyways, a useful thing I learned and actually used was to implement a generic OnEditorActionListener to move from one EditText to another in custom order:
private OnEditorActionListener getGotoNextListener(final EditText next) { return new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_NEXT) { next.requestFocus(); return true; } return false; } }; }
The problem was that I changed my initial plans and used EditTexts that were side-by-side so the focus didn’t move properly from one to another.

