I've added a simple choice for my app, which is accessible through a context menu button. I can cure the use of priority, and everything works there. The problem occurs when you leave preferences through the back button. The main activity of the app reappears, but then the whole screen is dimmed, there is almost one dialog that popped up or the context menu did not disappear, but it is not so.
Why do anybody have such an idea why this happens?
Main Activity: @ Override public boolean on option etam selected (menu item) {// handle item selection; Switch (item.getItemId ()) {Case RID Refresh: Refresh (); Back true; Case R.id.subreddits: startActivity (new intent (this, Prefs.class)); Back true; Default: Return Super.Options item selected (item); }} Priority: I will not write on If it does not help, it uses @ Override Public Boolean On Crate Option Menu (Menu Menu) {Super. Secret Options Menu (menu); // Infoletter MenuInflater inflater = getMenuInflater (); // inflater.inflate (R. menu.main_menu, menu); Back true; }
@ override protected form zero (bundle savedinstenstate) {super.onCreate (savedInstanceState); AddPreferencesFromResource (R.xml.subreddit_preferences); }
onCreateOptionsMenu () Instead of calling
super instead of returning to
true , return the results of the series to a super-class.
Preferences and does not suffer from the problems you quoted, see if you can find out that your code is with me What is this.
Comments
Post a Comment