android - Is there a way to handle key pressing in the fragment? -


i have fragment gridview , textview want handle search button pressing. how can this? if bind onkeylistener fragment's layout never called.

my suggestion handle on activity side , delegate fragment. need override onsearchrequested (check docs) , invoke method on fragment tell search requested. after fragment can update accordingly.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -