80,351
社区成员
发帖
与我相关
我的任务
分享
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.example.carson.graphsgo.Views.User.UserFragment">
<!--will be so slow switching must to give it up.-->
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_user"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="180dp"
app:contentScrim="@color/colorSub"
app:layout_scrollFlags="scroll">
<RelativeLayout
app:layout_collapseMode="none"
android:layout_width="match_parent"
android:layout_height="match_parent">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/civ_user_portrait"
android:layout_marginTop="30dp"
android:layout_centerHorizontal="true"
android:src="@drawable/bg_user_banner"
android:layout_width="95dp"
android:layout_height="95dp" />
<TextView
android:id="@+id/tv_name_user_fragment"
android:textSize="18.5sp"
android:textColor="@android:color/white"
android:layout_marginTop="140dp"
android:layout_centerHorizontal="true"
android:hint="@string/word_username"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/nest_sv_user"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout_fragment_user"
app:tabGravity="fill"
app:tabSelectedTextColor="@color/colorSub"
app:tabIndicatorColor="@color/colorSub"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TabItem
android:text="活动"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<android.support.design.widget.TabItem
android:text="作品"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
android:id="@+id/container_fragment_user"
android:layout_marginTop="2dp"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>