Last active
August 25, 2023 08:53
-
-
Save jonrysimbolon/0382c2d55f77ae046c2b28a9ee71b7e8 to your computer and use it in GitHub Desktop.
1. script yang pas ketika ingin menu berada dibawah sesuai imageview, maka ketika discroll, toolbar tersebut bakalan ngikut keatas dan gk collapse karna mode pin| 2. harap gunakan theme yg non material 3 sprti Theme.MaterialComponents.DayNight.NoActionBar bukan Theme.Material3.DayNight.NoActionBar biar animasi title mengecilnya itu mulus, kalo p…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:id="@+id/coordinatorLayout"> | |
<com.google.android.material.appbar.AppBarLayout | |
android:id="@+id/app_bar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<com.google.android.material.appbar.CollapsingToolbarLayout | |
android:id="@+id/toolbar_layout" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
app:layout_scrollFlags="scroll|exitUntilCollapsed" | |
app:contentScrim="?attr/colorPrimary" | |
app:toolbarId="@+id/toolbar"> | |
<androidx.appcompat.widget.AppCompatImageView | |
android:layout_width="match_parent" | |
android:layout_height="@dimen/_200dp" | |
android:scaleType="centerCrop" | |
android:src="@mipmap/ic_launcher" | |
app:layout_collapseMode="parallax" /> | |
<com.google.android.material.appbar.MaterialToolbar | |
app:title="@string/detail_movie" | |
android:id="@+id/toolbar" | |
app:navigationIcon="@drawable/ic_back" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
app:layout_collapseMode="pin" | |
android:layout_gravity="bottom" | |
app:menu="@menu/detail_menu" /> | |
</com.google.android.material.appbar.CollapsingToolbarLayout> | |
</com.google.android.material.appbar.AppBarLayout> | |
<include layout="@layout/detail_content_scrolling" /> | |
<!--<ImageView | |
android:id="@+id/posterIv" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_margin="@dimen/_16dp" | |
app:layout_anchor="@id/app_bar" | |
app:layout_anchorGravity="bottom|start" | |
app:srcCompat="@drawable/cinema" | |
android:importantForAccessibility="no" />--> | |
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment