Dbrant has submitted this change and it was merged. Change subject: Move adjustDrawableToTheme call to onCreateOptionsMenu ......................................................................
Move adjustDrawableToTheme call to onCreateOptionsMenu Saves a call when tapping on the overflow menu, and is more consistent with the rest of the adjustDrawableToTheme calls. Change-Id: I4aa6c8934b07093f1acc54f325af562b3b8e06d7 --- M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: Dbrant: Looks good to me, approved diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java index 103fb45..892d0b3 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java @@ -146,6 +146,7 @@ return; } inflater.inflate(R.menu.menu_page_actions, menu); + fragment.onCreateOptionsMenu(menu, inflater); } @Override diff --git a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java index b0cbb4d..e6449c1 100644 --- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java +++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java @@ -48,6 +48,7 @@ import android.view.Gravity; import android.view.LayoutInflater; import android.view.Menu; +import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; @@ -566,9 +567,11 @@ } } - public void onPrepareOptionsMenu(Menu menu) { + public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { app.adjustDrawableToTheme(menu.findItem(R.id.menu_toc).getIcon()); + } + public void onPrepareOptionsMenu(Menu menu) { switch (state) { case PageViewFragmentInternal.STATE_NO_FETCH: case PageViewFragmentInternal.STATE_INITIAL_FETCH: -- To view, visit https://gerrit.wikimedia.org/r/176894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4aa6c8934b07093f1acc54f325af562b3b8e06d7 Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: BearND <bsitzm...@wikimedia.org> Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org> Gerrit-Reviewer: Dbrant <dbr...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits