Skip to content

Instantly share code, notes, and snippets.

@alorma
Last active December 13, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alorma/ddbaca8c070eabba4624 to your computer and use it in GitHub Desktop.
Save alorma/ddbaca8c070eabba4624 to your computer and use it in GitHub Desktop.
<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:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbarLayout"
android:layout_width="match_parent"
android:layout_height="284dp"
android:background="?colorPrimary"
android:fitsSystemWindows="true"
android:minHeight="?actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/ctlLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gapXLarge"
android:fitsSystemWindows="true"
android:orientation="vertical"
app:layout_collapseMode="parallax">
<ImageView
android:id="@+id/userAvatar"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center_horizontal"
android:padding="@dimen/gapMicro"
tools:src="?colorAccent" />
<TextView
android:id="@id/userLogin"
style="@style/TextAppearance.AppCompat.Headline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gapSmall"
android:gravity="center_horizontal"
android:maxLines="1"
android:textSize="36sp"
tools:text="ALORMA" />
<TextView
android:id="@+id/userName"
style="@style/TextAppearance.AppCompat.Subhead"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/gapSmall"
android:gravity="center_horizontal"
android:maxLines="1"
android:textSize="22sp"
android:textStyle="bold"
tools:text="Bernat Borrás Paronella" />
</LinearLayout>
<android.support.v7.widget.Toolbar
android:id="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentInsetEnd="0dp"
android:minHeight="?actionBarSize"
app:contentInsetStart="@dimen/second_keyline"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/Toolbar.Popup.AppCompat"
app:theme="@style/Toolbar.AppCompat.Responsive" />
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:layout_gravity="bottom"
app:layout_collapseMode="pin" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="4dp"
android:orientation="vertical"
android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@id/listContentFL"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_github_light">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
</android.support.v4.widget.SwipeRefreshLayout>
<tr.xip.errorview.ErrorView xmlns:errorview="http://schemas.android.com/apk/res-auto"
android:id="@+id/error_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
errorview:ev_showRetryButton="true"
errorview:ev_showSubtitle="true"
errorview:ev_showTitle="true" />
<ProgressBar
android:id="@+id/loading_view"
style="?android:attr/progressBarStyleSmall"
tools:visibility="visible"
android:layout_width="?attr/listPreferredItemHeight"
android:layout_height="?attr/listPreferredItemHeight"
android:layout_gravity="center"
android:indeterminate="true"
android:visibility="gone" />
</FrameLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment