1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-23 16:40:32 +00:00

Do not hide feed buttons (show/hide & help) behind three-dots menu

This commit is contained in:
Stypox 2021-06-09 16:14:03 +02:00
parent 2142f05a88
commit 4698d07323
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
4 changed files with 5 additions and 9 deletions

View File

@ -130,7 +130,7 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
Log.d(TAG, "onCreateOptionsMenu() called with: " Log.d(TAG, "onCreateOptionsMenu() called with: "
+ "menu = [" + menu + "], inflater = [" + inflater + "]"); + "menu = [" + menu + "], inflater = [" + inflater + "]");
} }
inflater.inflate(R.menu.main_fragment_menu, menu); inflater.inflate(R.menu.menu_main_fragment, menu);
final ActionBar supportActionBar = activity.getSupportActionBar(); final ActionBar supportActionBar = activity.getSupportActionBar();
if (supportActionBar != null) { if (supportActionBar != null) {

View File

@ -169,13 +169,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
activity.supportActionBar?.subtitle = groupName activity.supportActionBar?.subtitle = groupName
inflater.inflate(R.menu.menu_feed_fragment, menu) inflater.inflate(R.menu.menu_feed_fragment, menu)
updateTogglePlayedItemsButton(menu.findItem(R.id.menu_item_feed_toggle_played_items))
menu.findItem(R.id.menu_item_feed_toggle_played_items).apply {
updateTogglePlayedItemsButton(this)
if (useAsFrontPage) {
setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER)
}
}
} }
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {

View File

@ -4,6 +4,7 @@
<item <item
android:id="@+id/menu_item_feed_toggle_played_items" android:id="@+id/menu_item_feed_toggle_played_items"
android:orderInCategory="2"
android:checkable="true" android:checkable="true"
android:checked="true" android:checked="true"
android:icon="@drawable/ic_visibility_on" android:icon="@drawable/ic_visibility_on"
@ -14,5 +15,6 @@
android:id="@+id/menu_item_feed_help" android:id="@+id/menu_item_feed_help"
android:icon="@drawable/ic_help" android:icon="@drawable/ic_help"
android:title="@string/help" android:title="@string/help"
app:showAsAction="never" /> android:orderInCategory="3"
app:showAsAction="ifRoom" />
</menu> </menu>