Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.coordinatorlayout.widget.CoordinatorLayout
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".DetailActivity">
- <com.google.android.material.appbar.AppBarLayout
- android:id="@+id/app_bar_detail"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <com.google.android.material.appbar.CollapsingToolbarLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:contentScrim="@color/white"
- app:layout_scrollFlags="scroll|snap|exitUntilCollapsed"
- app:titleEnabled="false">
- <androidx.constraintlayout.widget.ConstraintLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp"
- android:layout_marginBottom="16dp"
- android:layout_marginTop="?attr/actionBarSize">
- <TextView
- android:id="@+id/tv_title_detail"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:textAllCaps="false"
- android:textSize="18sp"
- android:textColor="@color/black"
- app:layout_constraintTop_toTopOf="parent"/>
- <TextView
- android:id="@+id/tv_date_detail"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- android:layout_marginTop="8dp"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/tv_title_detail"/>
- <TextView
- android:id="@+id/tv_separate"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="|"
- android:layout_marginStart="8dp"
- android:textAllCaps="false"
- android:textColor="@color/gray_text"
- app:layout_constraintBaseline_toBaselineOf="@id/tv_date_detail"
- app:layout_constraintEnd_toEndOf="@id/tv_date_detail"/>
- <TextView
- android:id="@+id/tv_author_detail"
- 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_detail"
- app:layout_constraintStart_toEndOf="@id/tv_separate"/>
- <com.google.android.material.card.MaterialCardView
- android:layout_width="match_parent"
- android:layout_height="180dp"
- app:cardCornerRadius="20dp"
- android:layout_marginTop="16dp"
- app:layout_constraintTop_toBottomOf="@id/tv_date_detail">
- <ImageView
- android:id="@+id/img_news_detail"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:contentDescription="Image News Detail"
- android:scaleType="centerCrop"
- android:src="@drawable/news_3"/>
- </com.google.android.material.card.MaterialCardView>
- </androidx.constraintlayout.widget.ConstraintLayout>
- <androidx.appcompat.widget.Toolbar
- android:id="@+id/toolbar_detail"
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:background="@color/white"
- app:layout_collapseMode="pin"/>
- </com.google.android.material.appbar.CollapsingToolbarLayout>
- </com.google.android.material.appbar.AppBarLayout>
- <androidx.core.widget.NestedScrollView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:paddingStart="16dp"
- android:paddingBottom="16dp"
- android:paddingEnd="16dp"
- app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
- <TextView
- android:id="@+id/tv_content_detail"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"
- android:textSize="18sp"/>
- </androidx.core.widget.NestedScrollView>
- </androidx.coordinatorlayout.widget.CoordinatorLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement