Skip to content

Instantly share code, notes, and snippets.

@davidliu
Last active March 31, 2019 20:07
Show Gist options
  • Select an option

  • Save davidliu/75af6d19d526928bfe85c949ccd31440 to your computer and use it in GitHub Desktop.

Select an option

Save davidliu/75af6d19d526928bfe85c949ccd31440 to your computer and use it in GitHub Desktop.

Revisions

  1. davidliu revised this gist Mar 31, 2019. No changes.
  2. davidliu created this gist Mar 7, 2019.
    40 changes: 40 additions & 0 deletions layout.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    <?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"
    android:layout_height="match_parent"
    android:layout_width="match_parent">

    <android.support.design.widget.AppBarLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <RelativeLayout
    android:id="@+id/profile_top_section"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#F00"
    app:layout_scrollFlags="scroll">

    <!-- User Data -->
    <View android:layout_width="match_parent" android:layout_height="200dp"></View>

    </RelativeLayout>

    <android.support.design.widget.TabLayout
    android:id="@+id/profile_tab_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#00F"
    app:layout_scrollFlags="scroll"/>
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
    android:id="@+id/profile_view_pager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#0F0"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

    </android.support.design.widget.CoordinatorLayout>