Advertisement
omacranger

CoordinatorLayoutActivity

Feb 5th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.88 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <android.support.design.widget.CoordinatorLayout
  4.    android:id="@+id/coordinator_layout"
  5.    xmlns:android="http://schemas.android.com/apk/res/android"
  6.    xmlns:app="http://schemas.android.com/apk/res-auto"
  7.    android:layout_width="match_parent"
  8.    android:layout_height="match_parent"
  9.    android:fitsSystemWindows="true">
  10.  
  11.     <android.support.design.widget.AppBarLayout
  12.        android:id="@+id/app_bar_layout"
  13.        android:layout_width="match_parent"
  14.        android:layout_height="240dp"
  15.        android:fitsSystemWindows="true"
  16.        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
  17.        >
  18.  
  19.         <android.support.design.widget.CollapsingToolbarLayout
  20.            android:id="@+id/collapsing_toolbar"
  21.            android:layout_width="match_parent"
  22.            android:layout_height="match_parent"
  23.            android:fitsSystemWindows="true"
  24.            app:contentScrim="?attr/colorPrimary"
  25.            app:expandedTitleMarginEnd="64dp"
  26.            app:expandedTitleMarginStart="48dp"
  27.            app:expandedTitleTextAppearance="@style/GasMonitorTheme.ActionBar.TitleTextAppearance"
  28.            app:layout_scrollFlags="scroll|exitUntilCollapsed">
  29.  
  30.             <ImageView
  31.                android:id="@+id/toolbar_imageview"
  32.                android:layout_width="match_parent"
  33.                android:layout_height="match_parent"
  34.                android:fitsSystemWindows="true"
  35.                android:scaleType="centerCrop"
  36.                android:transitionName="car_image"
  37.                app:layout_collapseMode="parallax"
  38.                />
  39.  
  40.             <android.support.v7.widget.Toolbar
  41.                android:id="@+id/toolbar_actionbar"
  42.                android:layout_width="match_parent"
  43.                android:layout_height="?attr/actionBarSize"
  44.                app:layout_collapseMode="pin"
  45.                app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
  46.  
  47.         </android.support.design.widget.CollapsingToolbarLayout>
  48.     </android.support.design.widget.AppBarLayout>
  49.  
  50.     <android.support.v7.widget.RecyclerView
  51.        android:layout_gravity="fill_vertical"
  52.        android:id="@+id/fragment_recyclerview"
  53.        android:layout_width="match_parent"
  54.        android:layout_height="match_parent"
  55.        app:layout_behavior="@string/appbar_scrolling_view_behavior"
  56.        />
  57.  
  58.     <android.support.design.widget.FloatingActionButton
  59.        android:id="@+id/fab"
  60.        android:layout_width="wrap_content"
  61.        android:layout_height="wrap_content"
  62.        android:layout_margin="@dimen/default_side_padding"
  63.        android:clickable="true"
  64.        android:src="@drawable/ic_add"
  65.        android:tint="@color/white"
  66.        app:layout_anchor="@id/coordinator_layout"
  67.        app:layout_anchorGravity="bottom|right|end"
  68.        />
  69. </android.support.design.widget.CoordinatorLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement