[Android] [PATCH] AudioBrowserFragment: focus related functional improvement

Mik Amchislavsky hailmikhail at gmail.com
Tue Oct 14 13:18:11 CEST 2014


Hi Geoffrey,

Thanks for asking. Now, I see room for improvement in a subsequent patch I
sent during the past weekend. I'll apply the improvement in a future
contribution.

Here, I'll address your question.

>>> Why don't you return *true* when the KeyEvent is handled?

Technically the dcb096606f3fd4a4a428c2ead70138eb7a644548 commit allows the
MainActivity, onKeyDown to track the view ID with present focus within
mFocusedPrior variable. Would the MainActivity onKeyDown event handler be
triggered if keyListener returned true ?

Architecturally, mFocusedPrior offers some value as an indicator of a past
onKey event. Before MainActivity calls mRootContainer.closeDrawer if
mFocusedPrior != 0 MainActivity transfers focus to the ActionBar.

Regards,

Mik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20141014/b14c6c9c/attachment.html>


More information about the Android mailing list