diff options
author | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-17 08:00:07 +0100 |
---|---|---|
committer | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-17 08:00:07 +0100 |
commit | d49771c90315897e0fe6eb8d4034e36853bf6650 (patch) | |
tree | 394125738b1ff504026528fcd9adbbc2cc5ae078 /app/src/main/res/layout/item_layout.xml | |
parent | 7288d5ae154f895d71727acc92828aa555e8108b (diff) |
Trying to mimic the Flower exemple from google.
Diffstat (limited to 'app/src/main/res/layout/item_layout.xml')
-rw-r--r-- | app/src/main/res/layout/item_layout.xml | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/app/src/main/res/layout/item_layout.xml b/app/src/main/res/layout/item_layout.xml index e03e874..c4b662c 100644 --- a/app/src/main/res/layout/item_layout.xml +++ b/app/src/main/res/layout/item_layout.xml @@ -2,6 +2,7 @@ <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" android:id="@+id/cv_cardView" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -10,10 +11,10 @@ android:focusable="true" android:foreground="?selectableItemBackground" app:cardCornerRadius="10dp" + app:cardBackgroundColor="@color/black" > - <RelativeLayout - android:id="@+id/rl_wrapper" + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" android:padding="20dp" @@ -23,30 +24,25 @@ android:id="@+id/iv_image" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_margin="10dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" android:src="@mipmap/ic_launcher_round" android:contentDescription="@string/rv_image" /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignTop="@id/iv_image" - android:layout_alignBottom="@id/iv_image" - android:layout_toEndOf="@id/iv_image" - android:orientation="vertical" - > - <TextView android:id="@+id/tv_title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="10dp" + app:layout_constraintStart_toEndOf="@id/iv_image" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" android:text="@string/rv_title" android:textColor="@color/strong_pink" - android:textSize="20sp"/> + android:textSize="30sp"/> - <TextView + <!--TextView android:id="@+id/tv_description" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -54,10 +50,8 @@ android:text="@string/rv_description" android:textColor="@color/slightly_desaturated_magenta" android:textSize="20sp" - /> - - </LinearLayout> + /--> - </RelativeLayout> + </androidx.constraintlayout.widget.ConstraintLayout> </androidx.cardview.widget.CardView>
\ No newline at end of file |