user_activity.xml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. tools:context=".feature.user.UserActivity">
  8. <com.google.android.material.appbar.AppBarLayout
  9. android:id="@id/user_app_bar"
  10. android:layout_width="match_parent"
  11. android:layout_height="@dimen/app_bar_height"
  12. android:elevation="@dimen/app_bar_elevation">
  13. <com.google.android.material.appbar.CollapsingToolbarLayout
  14. android:id="@+id/toolbar_layout"
  15. style="@style/Widget.Knigopis.CollapsingToolbar"
  16. android:layout_width="match_parent"
  17. android:layout_height="match_parent"
  18. app:contentScrim="?colorPrimary"
  19. app:expandedTitleGravity="center_vertical"
  20. app:expandedTitleMarginBottom="16dp"
  21. app:expandedTitleMarginStart="@dimen/title_start_margin_expanded"
  22. app:expandedTitleMarginTop="56dp"
  23. app:layout_scrollFlags="scroll|exitUntilCollapsed"
  24. app:toolbarId="@+id/toolbar">
  25. <com.google.android.material.appbar.MaterialToolbar
  26. android:id="@+id/toolbar"
  27. android:layout_width="match_parent"
  28. android:layout_height="@dimen/toolbar_height"
  29. android:elevation="0dp"
  30. app:layout_collapseMode="pin"
  31. app:titleMarginStart="@dimen/title_start_margin_collapsed" />
  32. </com.google.android.material.appbar.CollapsingToolbarLayout>
  33. </com.google.android.material.appbar.AppBarLayout>
  34. <ImageView
  35. android:id="@+id/userImage"
  36. android:layout_width="@dimen/avatar_size_expanded"
  37. android:layout_height="@dimen/avatar_size_expanded"
  38. android:layout_marginLeft="16dp"
  39. android:layout_marginTop="56dp"
  40. android:layout_marginRight="16dp"
  41. android:elevation="@dimen/app_bar_elevation"
  42. app:layout_behavior="com.sirekanyan.knigopis.feature.user.behavior.SimpleBehavior"
  43. tools:ignore="ContentDescription"
  44. tools:src="@drawable/oval_placeholder_on_primary" />
  45. <androidx.recyclerview.widget.RecyclerView
  46. android:id="@+id/userBooksRecyclerView"
  47. android:layout_width="match_parent"
  48. android:layout_height="match_parent"
  49. android:clipToPadding="false"
  50. android:paddingTop="0.5dp"
  51. app:layout_behavior="@string/appbar_scrolling_view_behavior"
  52. tools:listitem="@layout/user_book" />
  53. <ProgressBar
  54. android:id="@+id/userBooksProgressBar"
  55. android:layout_width="wrap_content"
  56. android:layout_height="wrap_content"
  57. android:layout_gravity="center"
  58. android:layout_marginTop="56dp"
  59. android:visibility="gone" />
  60. <TextView
  61. android:id="@+id/userBooksErrorPlaceholder"
  62. style="@style/PlaceholderStyle"
  63. android:layout_marginTop="56dp"
  64. android:text="@string/common.error.network" />
  65. <com.google.android.material.floatingactionbutton.FloatingActionButton
  66. android:id="@+id/fab"
  67. android:layout_width="wrap_content"
  68. android:layout_height="wrap_content"
  69. android:layout_margin="16dp"
  70. android:src="@drawable/ic_person_add"
  71. android:visibility="gone"
  72. app:backgroundTint="@drawable/subscribe_button_background"
  73. app:layout_anchor="@id/user_app_bar"
  74. app:layout_anchorGravity="bottom|end" />
  75. </androidx.coordinatorlayout.widget.CoordinatorLayout>