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"?>
<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"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="50dp">
android:layout_margin="7dp"
android:background="@color/white"
android:minHeight="50dp"
android:padding="5dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp"
app:cardMaxElevation="10dp">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp">
android:elevation="0dp"
android:padding="15dp">
<TextView
android:id="@+id/adresse_annonce"
......@@ -44,4 +50,4 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
</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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
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:padding="8dp">
android:padding="8dp"
app:cardCornerRadius="6dp"
app:cardElevation="2dp"
app:cardMaxElevation="10dp">
<ImageView
android:id="@+id/imageView"
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"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginTop="4dp"
android:fontFamily="sans-serif-medium"
android:text="Titre annonce de test"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent" />
android:minHeight="50dp"
android:paddingLeft="12dp"
android:paddingTop="8dp"
android:paddingRight="12dp"
android:paddingBottom="8dp">
<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" />
<ImageView
android:id="@+id/imageView"
android:layout_width="70dp"
android:layout_height="80dp"
android:src="@drawable/ic_launcher_background"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<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" />
<TextView
android:id="@+id/titre_annonce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:fontFamily="sans-serif-medium"
android:text="Titre annonce de test"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="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 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:clipToPadding="false" />
</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