Skip to content

Commit f7a0b99

Browse files
committed
Move Choose Tabs help message to Action Bar subtitle
1 parent 160f9df commit f7a0b99

3 files changed

Lines changed: 6 additions & 17 deletions

File tree

app/src/main/java/org/schabi/newpipe/settings/tabs/ChooseTabsFragment.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import androidx.annotation.NonNull;
1818
import androidx.annotation.Nullable;
1919
import androidx.appcompat.app.AlertDialog;
20+
import androidx.appcompat.app.AppCompatActivity;
2021
import androidx.appcompat.content.res.AppCompatResources;
2122
import androidx.appcompat.widget.AppCompatImageView;
2223
import androidx.fragment.app.Fragment;
@@ -86,6 +87,9 @@ public void onViewCreated(@NonNull final View rootView,
8687

8788
selectedTabsAdapter = new SelectedTabsAdapter(requireContext(), itemTouchHelper);
8889
listSelectedTabs.setAdapter(selectedTabsAdapter);
90+
91+
((AppCompatActivity) getActivity()).getSupportActionBar()
92+
.setSubtitle(R.string.main_page_content_swipe_remove);
8993
}
9094

9195
@Override

app/src/main/res/layout/fragment_choose_tabs.xml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,9 @@
99
<androidx.recyclerview.widget.RecyclerView
1010
android:id="@+id/selectedTabs"
1111
android:layout_width="match_parent"
12-
android:layout_height="wrap_content"
13-
android:layout_above="@+id/helpTextView"
14-
android:layout_alignParentTop="true"
15-
android:layout_marginTop="0dp"
12+
android:layout_height="match_parent"
1613
tools:listitem="@layout/list_choose_tabs" />
1714

18-
<TextView
19-
android:id="@+id/helpTextView"
20-
android:layout_width="wrap_content"
21-
android:layout_height="wrap_content"
22-
android:layout_alignParentStart="true"
23-
android:layout_alignParentBottom="true"
24-
android:layout_marginStart="8dp"
25-
android:layout_marginBottom="8dp"
26-
android:layout_toStartOf="@id/addTabsButton"
27-
android:text="@string/main_page_content_how_to_remove"
28-
android:textSize="16sp" />
29-
3015
<com.google.android.material.floatingactionbutton.FloatingActionButton
3116
android:id="@+id/addTabsButton"
3217
android:layout_width="wrap_content"

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432
<!-- Content -->
433433
<string name="main_page_content">Content of main page</string>
434434
<string name="main_page_content_summary">What tabs are shown on the main page</string>
435-
<string name="main_page_content_how_to_remove">Swipe left or right to remove item</string>
435+
<string name="main_page_content_swipe_remove">Swipe items to remove them</string>
436436
<string name="selection">Selection</string>
437437
<string name="blank_page_summary">Blank Page</string>
438438
<string name="kiosk_page_summary">Kiosk Page</string>

0 commit comments

Comments
 (0)