[Android] Update material dependency and use new styles and attributes

Nicolas Pomepuy git at videolan.org
Tue Oct 8 16:39:25 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Tue Oct  8 07:31:50 2019 +0200| [13eed7033c35d973c32bc207631a004a5a49d431] | committer: Geoffrey Métais

Update material dependency and use new styles and attributes

> https://code.videolan.org/videolan/vlc-android/commit/13eed7033c35d973c32bc207631a004a5a49d431
---

 build.gradle                               |  2 +-
 vlc-android/res/layout/dialog_playlist.xml | 52 ++++++++++++++++--------------
 vlc-android/res/layout/info_activity.xml   |  4 +--
 vlc-android/res/values/styles.xml          |  8 +++++
 4 files changed, 37 insertions(+), 29 deletions(-)

diff --git a/build.gradle b/build.gradle
index 4aa7037f2..69600eeb3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -44,7 +44,7 @@ ext {
     androidxAppcompatVersion = '1.1.0'
     androidxRecyclerviewVersion = '1.0.0'
     androidxLeanbackVersion = '1.0.0'
-    androidxMaterialVersion = '1.0.0'
+    androidxMaterialVersion = '1.1.0-beta01'
     constraintLayoutVersion = '1.1.3'
     archVersion = '2.1.0'
     roomVersion = '2.1.0'
diff --git a/vlc-android/res/layout/dialog_playlist.xml b/vlc-android/res/layout/dialog_playlist.xml
index 5eb92900c..716c7ddc8 100644
--- a/vlc-android/res/layout/dialog_playlist.xml
+++ b/vlc-android/res/layout/dialog_playlist.xml
@@ -53,36 +53,38 @@
             app:layout_constraintTop_toBottomOf="@+id/dialog_list_container" />
 
         <com.google.android.material.textfield.TextInputLayout
-            android:id="@+id/dialog_playlist_name"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="8dp"
-            android:layout_marginTop="8dp"
-            android:layout_marginEnd="8dp"
-            app:layout_constraintEnd_toStartOf="@+id/dialog_playlist_save"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/textView9">
+                android:id="@+id/dialog_playlist_name"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="8dp"
+                android:layout_marginTop="8dp"
+                android:layout_marginEnd="8dp"
+                android:layout_marginBottom="8dp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toStartOf="@+id/dialog_playlist_save"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@+id/textView9">
 
             <EditText
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_alignParentTop="true"
-                android:hint="@string/playlist_name_hint"
-                android:imeOptions="actionSend"
-                android:inputType="text" />
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_alignParentTop="true"
+                    android:hint="@string/playlist_name_hint"
+                    android:imeOptions="actionSend"
+                    android:inputType="text" />
         </com.google.android.material.textfield.TextInputLayout>
 
         <Button
-            android:id="@+id/dialog_playlist_save"
-            style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/dialog_playlist_name"
-            android:layout_alignParentEnd="true"
-            android:layout_marginEnd="8dp"
-            android:text="@string/add"
-            app:layout_constraintBottom_toBottomOf="@+id/dialog_playlist_name"
-            app:layout_constraintEnd_toEndOf="parent" />
+                android:id="@+id/dialog_playlist_save"
+                style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/dialog_playlist_name"
+                android:layout_alignParentEnd="true"
+                android:layout_marginEnd="8dp"
+                android:text="@string/add"
+                app:layout_constraintBottom_toBottomOf="@+id/dialog_playlist_name"
+                app:layout_constraintEnd_toEndOf="parent" />
     </androidx.constraintlayout.widget.ConstraintLayout>
 
 </androidx.core.widget.NestedScrollView>
diff --git a/vlc-android/res/layout/info_activity.xml b/vlc-android/res/layout/info_activity.xml
index c31fcb9a7..a9b68ffa9 100644
--- a/vlc-android/res/layout/info_activity.xml
+++ b/vlc-android/res/layout/info_activity.xml
@@ -370,10 +370,8 @@
                 vlc:layout_anchor="@+id/container"
                 vlc:layout_anchorGravity="bottom|end"
                 android:layout_margin="16dp"
-
                 vlc:layout_behavior="org.videolan.vlc.gui.helpers.FloatingActionButtonBehavior"
-                android:src="@drawable/ic_fab_play"
-                android:tint="@color/grey50"/>
+                android:src="@drawable/ic_fab_play" />
 
         <include layout="@layout/audioplayercontainer"/>
 
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index f967845b5..fc19f9d9f 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -20,9 +20,13 @@
         <item name="android:expandableListViewStyle">@style/Theme.VLC.List</item>
         <item name="android:dropDownListViewStyle">@style/Theme.VLC.List</item>
         <item name="preferenceTheme">@style/VLCPreferenceTheme.Light</item>
+        <item name="textInputStyle">@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
+        </item>
 
         <item name="colorPrimary">@color/orange800</item>
         <item name="colorPrimaryDark">@color/orange700</item>
+        <item name="colorSecondary">@color/orange700</item>
+        <item name="colorOnSecondary">@color/grey50</item>
         <item name="colorAccent">@color/orange500</item>
         <item name="windowActionModeOverlay">true</item>
         <item name="actionModeBackground">@color/orange500</item>
@@ -134,10 +138,14 @@
         <item name="android:expandableListViewStyle">@style/Theme.VLC.List</item>
         <item name="android:dropDownListViewStyle">@style/Theme.VLC.List</item>
         <item name="preferenceTheme">@style/VLCPreferenceTheme.Dark</item>
+        <item name="textInputStyle">@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox
+        </item>
 
         <item name="colorPrimary">@color/orange800</item>
         <item name="colorPrimaryDark">@color/transparent</item>
         <item name="colorAccent">@color/orange600</item>
+        <item name="colorSecondary">@color/orange600</item>
+        <item name="colorOnSecondary">@color/grey50</item>
         <item name="item_footer">@color/grey700</item>
         <item name="windowActionModeOverlay">true</item>
         <item name="actionModeBackground">@color/grey875</item>



More information about the Android mailing list