Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp"
- android:layout_marginTop="4dp"
- android:layout_marginBottom="4dp"
- android:clickable="true"
- android:focusable="true"
- app:cardBackgroundColor="@color/white"
- android:elevation="0dp">
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/transparent">
- <com.google.android.material.card.MaterialCardView
- android:layout_width="150dp"
- android:layout_height="120dp"
- app:cardBackgroundColor="@android:color/transparent"
- app:cardCornerRadius="20dp"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
- <ImageView
- android:id="@+id/img_news"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:contentDescription="Image News"
- android:scaleType="centerCrop"
- android:src="@drawable/news_3"/>
- </com.google.android.material.card.MaterialCardView>
- <androidx.constraintlayout.widget.Guideline
- android:id="@+id/guideline"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- app:layout_constraintGuide_begin="165dp"/>
- <TextView
- android:id="@+id/tv_category"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:maxLines="1"
- android:textColor="@color/orange"
- app:layout_constraintStart_toStartOf="@id/guideline"
- app:layout_constraintTop_toTopOf="parent"
- tools:text="@string/app_name"/>
- <TextView
- android:id="@+id/tv_title"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
- android:maxLines="3"
- android:textColor="@color/black"
- android:textSize="18sp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="@id/guideline"
- app:layout_constraintTop_toBottomOf="@id/tv_category"/>
- <TextView
- android:id="@+id/tv_date"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginBottom="4dp"
- android:maxLines="1"
- android:textAlignment="textStart"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintHorizontal_chainStyle="spread"
- app:layout_constraintHorizontal_weight="3"
- app:layout_constraintEnd_toStartOf="@id/tv_time"
- app:layout_constraintStart_toStartOf="@id/guideline"/>
- <TextView
- android:id="@+id/tv_time"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginBottom="4dp"
- android:maxLines="1"
- android:textAlignment="textStart"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- app:layout_constraintBaseline_toBaselineOf="@id/tv_date"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintHorizontal_chainStyle="spread"
- app:layout_constraintHorizontal_weight="2"
- app:layout_constraintStart_toEndOf="@id/tv_date"/>
- </androidx.constraintlayout.widget.ConstraintLayout>
- </com.google.android.material.card.MaterialCardView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement