Issue
I am attaching a focus listener to an EditText
during on OnCreateView
in my Fragment
.
If the EditText
gets focus, the listener is notified. So far so good, but the listener is notified again after screen rotation, when the focus is restored on the new Fragment
. Any good practice to distinguish between listener notification due to a configuration change and due to a real human interaction? Or to prevent the listener from being notified at all after a focus change due to a configuration change?
Solution
One needs to use onResume()
. onStart()
is called before the view restoration, so a listener registered here will fire.
Answered By - stefan.at.wpf
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.