user_activity.xml 3.7 KB

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