Skip to content

Instantly share code, notes, and snippets.

@bruferrari
Created June 25, 2016 00:31
Show Gist options
  • Save bruferrari/7b03d3cf0b8941b9f6dc2c25b329e168 to your computer and use it in GitHub Desktop.
Save bruferrari/7b03d3cf0b8941b9f6dc2c25b329e168 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:background="@color/ltgray"
tools:context=".ui.ArticleListActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="128dp"
android:theme="@style/Theme.Bacon.AppBarOverlay"
android:fitsSystemWindows="true"
app:elevation="@dimen/appbar_elevation">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapse_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:fitsSystemWindows="true">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="?attr/colorPrimary"
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="@fraction/paralax_multiplier"
android:layout_gravity="bottom">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo"
android:scaleType="centerCrop"
android:contentDescription="@string/app_name" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:elevation="@dimen/refresh_indicator_elevation">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:paddingLeft="@dimen/list_side_margin"
android:paddingRight="@dimen/list_side_margin"
android:paddingTop="@dimen/list_vertical_margin"
android:paddingBottom="@dimen/list_vertical_margin"/>
</android.support.v4.widget.SwipeRefreshLayout>
</android.support.design.widget.CoordinatorLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment