Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/cv_headline"
- 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"
- android:clickable="true"
- android:focusable="true"
- app:cardBackgroundColor="@android:color/transparent"
- app:cardElevation="0dp"
- app:layout_constraintTop_toTopOf="parent">
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:padding="16dp">
- <com.google.android.material.card.MaterialCardView
- android:id="@+id/card_image"
- android:layout_width="match_parent"
- android:layout_height="180dp"
- app:cardCornerRadius="20dp"
- app:layout_constraintTop_toTopOf="parent">
- <ImageView
- android:id="@+id/img_headline"
- android:layout_width="match_parent"
- android:layout_height="180dp"
- android:scaleType="centerCrop"
- android:contentDescription="@string/image_new_headline"
- android:src="@drawable/news_3"/>
- </com.google.android.material.card.MaterialCardView>
- <TextView
- android:id="@+id/tv_title_headline"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:maxLines="3"
- android:textAllCaps="false"
- android:textColor="@color/black"
- android:textSize="18sp"
- app:layout_constraintTop_toBottomOf="@+id/card_image" />
- <TextView
- android:id="@+id/tv_desc_headline"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:maxLines="2"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- app:layout_constraintTop_toBottomOf="@id/tv_title_headline"
- tools:layout_editor_absoluteX="16dp" />
- <TextView
- android:id="@+id/tv_date_headline"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8dp"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/tv_desc_headline"/>
- <TextView
- android:id="@+id/tv_seperate"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- android:text="@string/separate"
- app:layout_constraintBaseline_toBaselineOf="@id/tv_date_headline"
- app:layout_constraintStart_toEndOf="@id/tv_date_headline"
- app:layout_constraintTop_toBottomOf="@id/tv_desc_headline"
- app:layout_constraintEnd_toStartOf="@id/tv_author_headline"/>
- <TextView
- android:id="@+id/tv_author_headline"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- app:layout_constraintBaseline_toBaselineOf="@+id/tv_date_headline"
- app:layout_constraintStart_toEndOf="@id/tv_seperate"
- app:layout_constraintTop_toBottomOf="@id/tv_desc_headline"/>
- </androidx.constraintlayout.widget.ConstraintLayout>
- </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement