Commit 7ae3436a authored by Lucas NAURY's avatar Lucas NAURY

Conversion des éléments de liste en card avec ombre

parent e859a86b
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:layout_margin="7dp"
android:minHeight="50dp"> android:background="@color/white"
android:minHeight="50dp"
android:padding="5dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp"
app:cardMaxElevation="10dp">
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="10dp"> android:elevation="0dp"
android:padding="15dp">
<TextView <TextView
android:id="@+id/adresse_annonce" android:id="@+id/adresse_annonce"
...@@ -44,4 +50,4 @@ ...@@ -44,4 +50,4 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium" /> android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</RelativeLayout> </RelativeLayout>
</FrameLayout> </androidx.cardview.widget.CardView>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="4dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="4dp"
android:minHeight="50dp" android:minHeight="50dp"
android:padding="8dp"> android:padding="8dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp"
app:cardMaxElevation="10dp">
<ImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/imageView" android:layout_width="match_parent"
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/ic_launcher_background"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/titre_annonce"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:minHeight="50dp"
android:layout_marginTop="4dp" android:paddingLeft="12dp"
android:fontFamily="sans-serif-medium" android:paddingTop="8dp"
android:text="Titre annonce de test" android:paddingRight="12dp"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:paddingBottom="8dp">
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent" />
<TextView <ImageView
android:id="@+id/adresse_annonce" android:id="@+id/imageView"
android:layout_width="wrap_content" android:layout_width="70dp"
android:layout_height="wrap_content" android:layout_height="80dp"
android:text="Adresse, 59000 Douai" android:src="@drawable/ic_launcher_background"
app:layout_constraintStart_toStartOf="@+id/titre_annonce" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titre_annonce" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/prix_annonce" android:id="@+id/titre_annonce"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="8dp" android:layout_marginStart="8dp"
android:layout_marginBottom="8dp" android:layout_marginTop="4dp"
android:fontFamily="sans-serif-black" android:fontFamily="sans-serif-medium"
android:text="12.99€" android:text="Titre annonce de test"
android:textAlignment="viewEnd" android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/adresse_annonce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Adresse, 59000 Douai"
app:layout_constraintStart_toStartOf="@+id/titre_annonce"
app:layout_constraintTop_toBottomOf="@+id/titre_annonce" />
<TextView
android:id="@+id/prix_annonce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:fontFamily="sans-serif-black"
android:text="12.99€"
android:textAlignment="viewEnd"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.cardview.widget.CardView>
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view" android:id="@+id/recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
android:clipToPadding="false" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment