So, does the Guideline Android application development, if we want to disable the back panel and menu button during the daily application?
The programming guide for any OS (Windows, Mac, iOS, Android, etc.) does not violate the default behavior .
The user will expect that your application supports the default behavior of the device that he uses, and in most cases bought the device for this reason: he / she uses the default behavior. If he / she wants a different type of user interaction, he or she would buy a different type of device.
There are several buttons in my application that are very close to the default back button for this device and the menu button
While your button is on the screen, I don’t see how this can become a problem. If, however, this is a problem, a better solution than overriding the default behavior is to move or enlarge your buttons to make it easier for the user to hit them. p>
If so, how is this possible?
Yes, it can be done.
To disable the back button, simply override onBackPressed() in all Activity problems and leave it blank:
public void onBackPressed() {
The Menu button will only be a problem if you are inflating a menu from Activity . The standard behavior is that nothing happens when you press the Menu button until you tell your Activity to do something.
kaspermoerch
source share