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

Move Choose Tabs help message to Action Bar subtitle

This commit is contained in:
ktprograms 2021-08-24 17:28:28 +08:00
parent 160f9df64e
commit f7a0b9951e
3 changed files with 6 additions and 17 deletions

View File

@ -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

View File

@ -9,24 +9,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/selectedTabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/helpTextView"
android:layout_alignParentTop="true"
android:layout_marginTop="0dp"
android:layout_height="match_parent"
tools:listitem="@layout/list_choose_tabs" />
<TextView
android:id="@+id/helpTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="8dp"
android:layout_marginBottom="8dp"
android:layout_toStartOf="@id/addTabsButton"
android:text="@string/main_page_content_how_to_remove"
android:textSize="16sp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/addTabsButton"
android:layout_width="wrap_content"

View File

@ -432,7 +432,7 @@
<!-- Content -->
<string name="main_page_content">Content of main page</string>
<string name="main_page_content_summary">What tabs are shown on the main page</string>
<string name="main_page_content_how_to_remove">Swipe left or right to remove item</string>
<string name="main_page_content_swipe_remove">Swipe items to remove them</string>
<string name="selection">Selection</string>
<string name="blank_page_summary">Blank Page</string>
<string name="kiosk_page_summary">Kiosk Page</string>