MeetMe/Android-MultiStateView — pull request #6 by jhansche (2014-05-15 17:09:48+00:00)
Title: Resolve issue of delayed-hide causing both state views to be hidden

In a situation where the view is not yet attached to the window, calling `setState()` will enqueue a delayed hide of the previous state. If the view then becomes attached to the window *before* the previous state gets hidden, and `setState()` is called again, both views will become hidden. In other words:

* View not attached to window
* Call setState()
* View attached to window
* Call setState()
* Both views get hidden (called on separate Handler instances, both of which affect the current MultiStateView)

The fix is to release the "default" Handler in `onAttachedToWindow()`, where the Handler gets replaced with one that uses the AttachInfo Looper.

In the process, I'm also converting the Handler to a static inner class with a WeakReference to the view.