Advertisement
uwong15

Untitled

Dec 16th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.14 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent" >
  7.  
  8.     <LinearLayout
  9.        android:id="@+id/main"
  10.        android:layout_width="match_parent"
  11.        android:layout_height="match_parent"
  12.        android:orientation="vertical">
  13.  
  14.         <androidx.coordinatorlayout.widget.CoordinatorLayout
  15.            android:id="@+id/main_content"
  16.            android:layout_width="match_parent"
  17.            android:layout_height="match_parent"
  18.            android:fitsSystemWindows="false">
  19.  
  20.             <com.google.android.material.appbar.AppBarLayout
  21.                android:id="@+id/appbar"
  22.                android:layout_width="match_parent"
  23.                android:layout_height="wrap_content"
  24.                android:background="@color/gray">
  25.  
  26.                 <com.google.android.material.appbar.CollapsingToolbarLayout
  27.                    android:id="@+id/collapsing_toolbar"
  28.                    android:layout_width="match_parent"
  29.                    android:layout_height="wrap_content"
  30.                    android:fitsSystemWindows="true"
  31.                    app:expandedTitleMarginEnd="64dp"
  32.                    app:expandedTitleMarginStart="48dp"
  33.                    app:expandedTitleTextAppearance="@android:color/transparent"
  34.                    app:layout_scrollFlags="scroll|exitUntilCollapsed">
  35.                     <!--app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">-->
  36.  
  37.                     <androidx.cardview.widget.CardView
  38.                        android:layout_width="match_parent"
  39.                        android:layout_height="wrap_content"
  40.                        app:cardElevation="1dp"
  41.                        app:cardCornerRadius="@dimen/default_margin"
  42.                        app:cardUseCompatPadding="true">
  43.  
  44.                         <LinearLayout
  45.                            android:layout_width="match_parent"
  46.                            android:layout_height="wrap_content"
  47.                            android:orientation="vertical">
  48.  
  49.                             // Set Header here
  50.                         </LinearLayout>
  51.                     </androidx.cardview.widget.CardView>
  52.                 </com.google.android.material.appbar.CollapsingToolbarLayout>
  53.  
  54.                 <View
  55.                    android:layout_width="match_parent"
  56.                    android:layout_height="wrap_content" />
  57.  
  58.             </com.google.android.material.appbar.AppBarLayout>
  59.  
  60.             <RecyclerView
  61.                android:id="@+id/list"
  62.                android:layout_width="match_parent"
  63.                android:layout_height="match_parent"
  64.                android:layout_marginTop="4dp"
  65.                android:background="@color/white"
  66.                app:layout_collapseMode="parallax"
  67.                app:layout_behavior="@string/appbar_scrolling_view_behavior" />
  68.         </androidx.coordinatorlayout.widget.CoordinatorLayout>
  69.     </LinearLayout>
  70. </FrameLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement