Skip to content

Instantly share code, notes, and snippets.

@vipulshah2010
Created June 20, 2015 10:43
Show Gist options
  • Save vipulshah2010/510f2ac6289b6b98e7eb to your computer and use it in GitHub Desktop.
Save vipulshah2010/510f2ac6289b6b98e7eb to your computer and use it in GitHub Desktop.
AppBar layout with Toolbar & ViewPager
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<include
android:id="@+id/toolbar"
layout="@layout/view_toolbar" />
<android.support.design.widget.TabLayout
android:id="@+id/deviceTabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/deviceViewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment