Skip to content

Instantly share code, notes, and snippets.

@li2
Last active August 15, 2016 05:18
Show Gist options
  • Save li2/38794f9afb5047579f32dc42aca340dd to your computer and use it in GitHub Desktop.
Save li2/38794f9afb5047579f32dc42aca340dd to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.AppBarLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/topActionbarLayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:elevation="@dimen/elevation_header">
<android.support.v7.widget.Toolbar
android:id="@+id/topActionbar"
android:layout_width="match_parent"
android:layout_height="@dimen/headerBarHeight"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/topActionBack"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:gravity="center"
android:background="?selectableItemBackground"/>
<TextView
android:id="@+id/topActionTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:text="title"/>
<Button
android:id="@+id/topActionClose"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="?selectableItemBackground"
android:text="Close"/>
</RelativeLayout>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment