Advertisement
aril941

Untitled

Apr 28th, 2022
1,207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.16 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    android:layout_width="match_parent"
  4.    android:layout_height="match_parent"
  5.    xmlns:app="http://schemas.android.com/apk/res-auto"
  6.    xmlns:tools="http://schemas.android.com/tools">
  7.  
  8.     <com.google.android.material.card.MaterialCardView
  9.        android:id="@+id/card"
  10.        android:layout_width="match_parent"
  11.        android:layout_height="wrap_content"
  12.        android:layout_margin="8dp"
  13.        android:layout_marginStart="15dp"
  14.        android:layout_marginTop="10dp"
  15.        android:layout_marginEnd="5dp"
  16.        app:strokeWidth="3dp"
  17.        app:strokeColor="@color/background"
  18.        app:layout_constraintEnd_toEndOf="parent"
  19.        app:layout_constraintStart_toStartOf="parent"
  20.        app:layout_constraintTop_toTopOf="parent">
  21.  
  22.         <LinearLayout
  23.            android:layout_width="match_parent"
  24.            android:layout_height="wrap_content"
  25.            android:orientation="vertical">
  26.  
  27.             <!-- Media -->
  28.             <ImageView
  29.                android:id="@+id/image"
  30.                android:layout_width="match_parent"
  31.                android:layout_height="180dp"
  32.                android:contentDescription="@string/content_description_media"
  33.                android:scaleType="centerCrop"
  34.                tools:src="@tools:sample/avatars" />
  35.  
  36.             <LinearLayout
  37.                android:layout_width="match_parent"
  38.                android:layout_height="wrap_content"
  39.                android:orientation="vertical"
  40.                android:padding="6dp">
  41.  
  42.                 <!-- Title, secondary and supporting text -->
  43.                 <TextView
  44.                    android:id="@+id/name"
  45.                    android:layout_width="wrap_content"
  46.                    android:layout_height="wrap_content"
  47.                    android:textSize="18sp"
  48.                    tools:text="@string/app_name" />
  49.             </LinearLayout>
  50.         </LinearLayout>
  51.  
  52.     </com.google.android.material.card.MaterialCardView>
  53.  
  54. </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement