问题
From Android Jellybeans, all sub-activities of Settings activity are having this back button at top left corner which calls the Settings activity. It behaves more like a 'up' button for navigation purpose.
I have android code, and I want to disable this button for few sub-activities like display, sound etc. in my build.
Any suggestions, where do I have to modify to disable this? I tried out removing
android:parentActivityName
tag from particular Activity in the Manifest file, but it didn't work.
回答1:
Try this
getActionBar().setDisplayHomeAsUpEnabled(false);
来源:https://stackoverflow.com/questions/24821828/android-how-to-disable-top-left-back-button-from-subsettings