(Which onPause () is a function of the way I wrote it myself)
But the phone is still useful for testing the return key. . . Rewrite onKeyDown () shielding can not afford to return to the original key function?
<-! Baidu Button BEGIN -> more Share to: <-! Baidu Button END ->
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) -> Reply: Students very tangled ah ~ ~ I Reply: onPause () function is the Activity lifecycle, you should not call this method in the code. Put your other name change of approach it. Other logic seems to be right, you can print the log to confirm before you return true. Reply: put onPause () to change the name, and then log the next, after running found no print log. . . . . Why? What was wrong, how there is no overloading on? Reply: Classmates. . . ~ ~ ~ Really frustrating to the point of thinking? Reply: Probably because the focus is not on your custom View, Your View did not receive the event message it .. Reply: Ran into this problem, the landlord is not resolved Reply: return super.onKeyDown (keyCode, event); Remove the phrase Reply: Should not, ah, ah what you debug and see the code did not go in there, oh! Reply: Response back button default handler function activity in onbackpressed class, override this function, you can achieve is empty. Reply: Yesterday lesson a little more, did not see, So far this morning have not solved -! Not calm Reply: Breakpoint Debug, the result is simply not enter this code. . . This is why. . . . . Fast tangled dead Reply: Overwrite a onBackPress has so difficult? Reply: The code in the Activity class inherits View bearer class in it. . . . Is it a class inheriting View will not do it? Reply: tried in succession replication onBackPress View this class does not work, can only replicate in Activity in onBackPress or me rewrite onKeydown Reply:
I see that you are in the view inside ah, the custom view is not listening to this one Reply:
Overwrite a onBackPress has so difficult?
tried in succession replication onBackPress View this class does not work, can only replicate in Activity in onBackPress or me rewrite onKeydown
There is a thing called the interface, there is a thing called a callback.
No comments:
Post a Comment