From 927a1d58e290bce6fd50b3840439490ebc40aece Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 21 May 2020 08:58:37 +0200 Subject: [PATCH] Use drop down/up instead of expand icons in drawer As per the material guidelines --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 4 ++-- app/src/main/res/drawable/ic_arrow_drop_down_white_24dp.xml | 5 +++++ app/src/main/res/drawable/ic_arrow_drop_up_white_24dp.xml | 5 +++++ app/src/main/res/layout/drawer_header.xml | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 app/src/main/res/drawable/ic_arrow_drop_down_white_24dp.xml create mode 100644 app/src/main/res/drawable/ic_arrow_drop_up_white_24dp.xml diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index d74031704..a80ca89ac 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -342,7 +342,7 @@ public class MainActivity extends AppCompatActivity { } private void showServices() { - serviceArrow.setImageResource(R.drawable.ic_expand_less_white_24dp); + serviceArrow.setImageResource(R.drawable.ic_arrow_drop_up_white_24dp); for (StreamingService s : NewPipe.getServices()) { final String title = s.getServiceInfo().getName() @@ -407,7 +407,7 @@ public class MainActivity extends AppCompatActivity { } private void showTabs() throws ExtractionException { - serviceArrow.setImageResource(R.drawable.ic_expand_more_white_24dp); + serviceArrow.setImageResource(R.drawable.ic_arrow_drop_down_white_24dp); //Tabs int currentServiceId = ServiceHelper.getSelectedServiceId(this); diff --git a/app/src/main/res/drawable/ic_arrow_drop_down_white_24dp.xml b/app/src/main/res/drawable/ic_arrow_drop_down_white_24dp.xml new file mode 100644 index 000000000..65e1e4228 --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_drop_down_white_24dp.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_arrow_drop_up_white_24dp.xml b/app/src/main/res/drawable/ic_arrow_drop_up_white_24dp.xml new file mode 100644 index 000000000..1d266cecc --- /dev/null +++ b/app/src/main/res/drawable/ic_arrow_drop_up_white_24dp.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/layout/drawer_header.xml b/app/src/main/res/layout/drawer_header.xml index 581ad2c7d..324a3e799 100644 --- a/app/src/main/res/layout/drawer_header.xml +++ b/app/src/main/res/layout/drawer_header.xml @@ -107,7 +107,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:layout_marginStart="4dp" - app:srcCompat="@drawable/ic_expand_more_white_24dp" + app:srcCompat="@drawable/ic_arrow_drop_down_white_24dp" tools:ignore="ContentDescription" />