[Android] Add Ripple Effect to recyclerView items

Habib Kazemi git at videolan.org
Mon Oct 22 15:13:54 CEST 2018


vlc-android | branch: master | Habib Kazemi <kazemihabib1996 at gmail.com> | Fri Oct 19 23:05:06 2018 +0330| [83187f5abf34a389f17b5bda9c53353dc016f673] | committer: Geoffrey Métais

Add Ripple Effect to recyclerView items

Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>

> https://code.videolan.org/videolan/vlc-android/commit/83187f5abf34a389f17b5bda9c53353dc016f673
---

 vlc-android/res/layout/subtitle_download_fragment.xml | 4 ++--
 vlc-android/res/layout/subtitle_download_item.xml     | 3 +++
 vlc-android/res/layout/subtitle_history_fragment.xml  | 2 --
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/vlc-android/res/layout/subtitle_download_fragment.xml b/vlc-android/res/layout/subtitle_download_fragment.xml
index 93a71f4a1..0d2a8de26 100644
--- a/vlc-android/res/layout/subtitle_download_fragment.xml
+++ b/vlc-android/res/layout/subtitle_download_fragment.xml
@@ -110,8 +110,8 @@
             app:refreshing="@{viewmodel.isApiLoading}"
             app:onRefreshListener="@{()-> viewmodel.onRefresh()}"
             app:layout_constraintBottom_toBottomOf="parent"
-            app:layout_constraintEnd_toStartOf="@+id/right_vertical_guideline"
-            app:layout_constraintStart_toStartOf="@+id/left_vertical_guideline"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@id/barrier" >
             <androidx.recyclerview.widget.RecyclerView
                 android:id="@+id/subtitle_list"
diff --git a/vlc-android/res/layout/subtitle_download_item.xml b/vlc-android/res/layout/subtitle_download_item.xml
index 6b9627faf..06de309cf 100644
--- a/vlc-android/res/layout/subtitle_download_item.xml
+++ b/vlc-android/res/layout/subtitle_download_item.xml
@@ -12,6 +12,9 @@
     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:paddingStart="16dp"
+        android:paddingEnd="16dp"
+        android:background="?android:attr/selectableItemBackground"
         android:minHeight="50dp"
         android:focusable="true">
 
diff --git a/vlc-android/res/layout/subtitle_history_fragment.xml b/vlc-android/res/layout/subtitle_history_fragment.xml
index e06862fa6..c723f79f4 100644
--- a/vlc-android/res/layout/subtitle_history_fragment.xml
+++ b/vlc-android/res/layout/subtitle_history_fragment.xml
@@ -11,8 +11,6 @@
             android:layout_width="0dp"
             android:layout_height="0dp"
             android:layout_marginBottom="8dp"
-            android:layout_marginEnd="16dp"
-            android:layout_marginStart="16dp"
             android:layout_marginTop="16dp"
             android:focusable="true"
             app:layout_constraintBottom_toBottomOf="parent"



More information about the Android mailing list