can we detect a key is pressed in fragments
I am developing an application in which I want to do some thing when a key is pressed. Can we implement in the fragments.
I do not want to do anything in the activity.
Thanks in adv开发者_开发知识库ance.
You can detect this in the Activity
your Fragment
is a part of. Fragments
are part of Activity
, not vice versa.
精彩评论