From f7a0b9951e283649ee329baff9cfe723094fabb3 Mon Sep 17 00:00:00 2001 From: ktprograms Date: Tue, 24 Aug 2021 17:28:28 +0800 Subject: [PATCH] Move Choose Tabs help message to Action Bar subtitle --- .../settings/tabs/ChooseTabsFragment.java | 4 ++++ .../main/res/layout/fragment_choose_tabs.xml | 17 +---------------- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java index 6e50765ba..d8a9637bf 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java @@ -17,6 +17,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.content.res.AppCompatResources; import androidx.appcompat.widget.AppCompatImageView; import androidx.fragment.app.Fragment; @@ -86,6 +87,9 @@ public class ChooseTabsFragment extends Fragment { selectedTabsAdapter = new SelectedTabsAdapter(requireContext(), itemTouchHelper); listSelectedTabs.setAdapter(selectedTabsAdapter); + + ((AppCompatActivity) getActivity()).getSupportActionBar() + .setSubtitle(R.string.main_page_content_swipe_remove); } @Override diff --git a/app/src/main/res/layout/fragment_choose_tabs.xml b/app/src/main/res/layout/fragment_choose_tabs.xml index d35b58a49..ac6a0f4e5 100644 --- a/app/src/main/res/layout/fragment_choose_tabs.xml +++ b/app/src/main/res/layout/fragment_choose_tabs.xml @@ -9,24 +9,9 @@ - - Content of main page What tabs are shown on the main page - Swipe left or right to remove item + Swipe items to remove them Selection Blank Page Kiosk Page