From 160f9df64e8381e7e3e60e8c25d5415687389989 Mon Sep 17 00:00:00 2001 From: ktprograms Date: Tue, 24 Aug 2021 09:39:18 +0800 Subject: [PATCH 1/4] Add how to remove tab from main page text --- app/build.gradle | 4 ++++ .../main/res/layout/fragment_choose_tabs.xml | 17 ++++++++++++++++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index c4a8afea4..7b3ecd2d4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -214,6 +214,10 @@ dependencies { implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation "androidx.room:room-runtime:${androidxRoomVersion}" implementation "androidx.room:room-rxjava3:${androidxRoomVersion}" + + // Apple Silicon Mac workaround (https://issuetracker.google.com/issues/174695268#comment9) + kapt "org.xerial:sqlite-jdbc:3.34.0" + kapt "androidx.room:room-compiler:${androidxRoomVersion}" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.webkit:webkit:1.4.0' diff --git a/app/src/main/res/layout/fragment_choose_tabs.xml b/app/src/main/res/layout/fragment_choose_tabs.xml index ac6a0f4e5..d35b58a49 100644 --- a/app/src/main/res/layout/fragment_choose_tabs.xml +++ b/app/src/main/res/layout/fragment_choose_tabs.xml @@ -9,9 +9,24 @@ + + Content of main page What tabs are shown on the main page + Swipe left or right to remove item Selection Blank Page Kiosk Page From f7a0b9951e283649ee329baff9cfe723094fabb3 Mon Sep 17 00:00:00 2001 From: ktprograms Date: Tue, 24 Aug 2021 17:28:28 +0800 Subject: [PATCH 2/4] 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 From 4f5e7721576faebf0b338152f1600cfb307d02da Mon Sep 17 00:00:00 2001 From: ktprograms Date: Tue, 24 Aug 2021 19:43:27 +0800 Subject: [PATCH 3/4] Remove xerial sqlite dependency --- app/build.gradle | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7b3ecd2d4..c4a8afea4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -214,10 +214,6 @@ dependencies { implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation "androidx.room:room-runtime:${androidxRoomVersion}" implementation "androidx.room:room-rxjava3:${androidxRoomVersion}" - - // Apple Silicon Mac workaround (https://issuetracker.google.com/issues/174695268#comment9) - kapt "org.xerial:sqlite-jdbc:3.34.0" - kapt "androidx.room:room-compiler:${androidxRoomVersion}" implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.webkit:webkit:1.4.0' From e95637f7b75f091a3bfe4f6a1d7fc30ff0db7801 Mon Sep 17 00:00:00 2001 From: ktprograms Date: Fri, 27 Aug 2021 09:20:23 +0800 Subject: [PATCH 4/4] Add help text in fragment_choose_tabs.xml, convert to ConstraintLayout --- .../settings/tabs/ChooseTabsFragment.java | 4 --- .../main/res/layout/fragment_choose_tabs.xml | 32 +++++++++++++++---- 2 files changed, 25 insertions(+), 11 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 d8a9637bf..6e50765ba 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,7 +17,6 @@ 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; @@ -87,9 +86,6 @@ 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 ac6a0f4e5..e59dad637 100644 --- a/app/src/main/res/layout/fragment_choose_tabs.xml +++ b/app/src/main/res/layout/fragment_choose_tabs.xml @@ -1,31 +1,49 @@ - + + - +