circle_of_friends_fragment.xml 3.9 KB

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