xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context=".activities.MealActivity">
<com.google.android.material.appbar.AppBarLayout android:id="@+id/appBarLayout"
android:layout_width="match_parent" android:layout_height="@dimen/_230sdp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsingToolbarLayout" android:layout_width="match_parent"
android:layout_height="match_parent" android:background="@android:color/transparent"
app:collapsedTitleTextColor="@android:color/white" app:contentScrim="@color/accent"
app:layout_scrollFlags="scroll|snap|exitUntilCollapsed" app:title="Meal Name">
<ImageView
android:id="@+id/imageView_detail" android:layout_width="match_parent"
android:layout_height="match_parent" android:scaleType="centerCrop"
app:layout_collapseMode="parallax" />
<androidx.appcompat.widget.Toolbar android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_height="?actionBarSize"
app:layout_collapseMode="pin" /> </com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginEnd="@dimen/_10sdp"
android:backgroundTint="@color/accent" android:src="@drawable/favorite"
android:tint="@color/white" app:layout_anchor="@id/appBarLayout"
app:layout_anchorGravity="bottom|end" />
<androidx.core.widget.NestedScrollView android:layout_width="match_parent"
android:layout_height="match_parent" app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout
android:id="@+id/linearLayout" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginHorizontal="@dimen/_5sdp"
android:layout_marginTop="@dimen/_5sdp" android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_weight="1"
android:drawableLeft="@drawable/category" android:drawableTint="@color/g_black"
android:fontFamily="@font/roboto" android:text="Category : Beef"
android:textColor="@color/g_black" android:textStyle="bold" />
<TextView
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:drawableLeft="@drawable/location"
android:drawableTint="@color/g_black" android:fontFamily="@font/roboto"
android:text="Area : Kyrgyzstan" android:textColor="@color/g_black"
android:textStyle="bold" />
Оберните код в теги: 3 символа ` до и после кода (в случае одиночной конструкции достаточно 1 ` с обеих сторон). Спасибо!
Обсуждают сегодня