circle_of_friends_fragment.xml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:id="@+id/main_content"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent">
  7. <android.support.design.widget.AppBarLayout
  8. android:id="@+id/appbar"
  9. android:layout_width="match_parent"
  10. android:layout_height="256dp"
  11. android:fitsSystemWindows="true">
  12. <android.support.design.widget.CollapsingToolbarLayout
  13. android:id="@+id/collapsing_toolbar"
  14. android:layout_width="match_parent"
  15. android:layout_height="match_parent"
  16. app:layout_scrollFlags="scroll|exitUntilCollapsed"
  17. android:fitsSystemWindows="true"
  18. app:contentScrim="?attr/colorPrimary"
  19. app:expandedTitleMarginStart="48dp"
  20. app:expandedTitleMarginEnd="64dp">
  21. <RelativeLayout
  22. android:layout_width="match_parent"
  23. android:layout_height="match_parent"
  24. android:orientation="vertical"
  25. app:layout_collapseMode="parallax"
  26. android:fitsSystemWindows="true" >
  27. <ImageView
  28. android:layout_width="match_parent"
  29. android:layout_height="match_parent"
  30. android:scaleType="centerCrop"/>
  31. <LinearLayout
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"
  34. android:orientation="horizontal"
  35. android:layout_alignParentBottom="true"
  36. android:layout_marginStart="40dp"
  37. android:layout_marginLeft="40dp"
  38. android:layout_marginBottom="40dp">
  39. <ImageView
  40. android:id="@+id/circle_avatar"
  41. android:layout_width="48dp"
  42. android:layout_height="48dp"
  43. android:textStyle="bold"
  44. android:textSize="30sp" />
  45. <TextView
  46. android:layout_width="match_parent"
  47. android:layout_height="match_parent"
  48. android:text="用户昵称"
  49. android:textSize="33sp"
  50. android:gravity="center"
  51. android:textColor="@android:color/white"
  52. />
  53. </LinearLayout>
  54. </RelativeLayout>
  55. <!--<android.support.v7.widget.Toolbar-->
  56. <!--android:id="@+id/toolbar_details"-->
  57. <!--android:layout_width="match_parent"-->
  58. <!--android:layout_height="?attr/actionBarSize"-->
  59. <!--app:layout_collapseMode="pin" />-->
  60. </android.support.design.widget.CollapsingToolbarLayout>
  61. </android.support.design.widget.AppBarLayout>
  62. <LinearLayout
  63. android:layout_width="match_parent"
  64. android:layout_height="match_parent"
  65. android:orientation="vertical"
  66. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  67. <android.support.v7.widget.RecyclerView
  68. android:id="@+id/circle_recyclerview"
  69. android:layout_width="match_parent"
  70. android:layout_height="match_parent"/>
  71. </LinearLayout>
  72. <android.support.design.widget.FloatingActionButton
  73. android:id="@+id/circle_fab"
  74. android:layout_height="wrap_content"
  75. android:layout_width="wrap_content"
  76. app:layout_anchor="@id/appbar"
  77. app:layout_anchorGravity="bottom|right|end"
  78. android:src="@drawable/ic_add_friends"
  79. android:layout_margin="24dp"
  80. android:clickable="true"/>
  81. </android.support.design.widget.CoordinatorLayout>