appcelerator/titanium_mobile — pull request #5636 by mokesmokes (2014-04-21 19:51:25+00:00)
Title: TC-4029: normalize tab selection/unselection cross-platform, and keyboard hiding improvement

Prior to this PR, in Android we had no reliable event for tab selection and unselection. The tab focus and blur events would fire in these cases, but as the JIRA issue shows they also fired under additional circumstances as well. In order to not mess with the (rather complex!!!) focus/blur bubbling logic in Titanium Android (and not break existing apps), this PR simply added the `selected` and `unselected` events for tabs (with the additional benefit of the clearer event name than focus and blur).

In iOS, the `focus` and `blur` events functioned exactly as tab selection indicators, and there was no bubbling event confusion in their case between window, tab, and tab group. However, to be compatible with Android these events were renamed to `selected` and `unselected`. The tab `focus` and `blur` events have been removed for iOS.

Additionally, in Android the keyboard is now hidden when the tab selection changes, and not when the tab loses focus (e.g. when the screen is locked), providing for a much smoother user experience.