activity_main.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout 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:id="@+id/container"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. android:background="@color/white"
  9. android:orientation="vertical"
  10. tools:context="me.vadik.knigopis.MainActivity">
  11. <android.support.design.widget.AppBarLayout
  12. android:layout_width="match_parent"
  13. android:layout_height="wrap_content"
  14. android:theme="@style/AppBarTheme">
  15. <android.support.v7.widget.Toolbar
  16. android:id="@+id/toolbar"
  17. android:layout_width="match_parent"
  18. android:layout_height="wrap_content"
  19. app:title="@string/app_name" />
  20. </android.support.design.widget.AppBarLayout>
  21. <FrameLayout
  22. android:layout_width="match_parent"
  23. android:layout_height="0dp"
  24. android:layout_weight="1">
  25. <android.support.v7.widget.RecyclerView
  26. android:id="@+id/booksRecyclerView"
  27. android:layout_width="match_parent"
  28. android:layout_height="match_parent"
  29. tools:listitem="@layout/book" />
  30. <android.support.v7.widget.RecyclerView
  31. android:id="@+id/usersRecyclerView"
  32. android:layout_width="match_parent"
  33. android:layout_height="match_parent"
  34. android:clipToPadding="false"
  35. android:paddingBottom="8dp"
  36. android:paddingTop="8dp"
  37. tools:listitem="@layout/user"
  38. tools:visibility="gone" />
  39. <android.support.v7.widget.RecyclerView
  40. android:id="@+id/notesRecyclerView"
  41. android:layout_width="match_parent"
  42. android:layout_height="match_parent"
  43. android:clipToPadding="false"
  44. android:paddingBottom="8dp"
  45. android:paddingTop="8dp"
  46. tools:listitem="@layout/note"
  47. tools:visibility="gone" />
  48. <ProgressBar
  49. android:id="@+id/booksProgressBar"
  50. android:layout_width="match_parent"
  51. android:layout_height="wrap_content"
  52. android:layout_gravity="center"
  53. android:alpha="0"
  54. tools:alpha="1" />
  55. <TextView
  56. android:id="@+id/booksPlaceholder"
  57. android:layout_width="wrap_content"
  58. android:layout_height="wrap_content"
  59. android:layout_gravity="center"
  60. android:alpha="0"
  61. android:gravity="center"
  62. android:padding="16dp"
  63. android:textSize="16sp"
  64. android:visibility="gone"
  65. tools:alpha="1"
  66. tools:text="@string/error_loading_books"
  67. tools:visibility="visible" />
  68. <android.support.design.widget.FloatingActionButton
  69. android:id="@+id/addBookButton"
  70. android:layout_width="wrap_content"
  71. android:layout_height="wrap_content"
  72. android:layout_gravity="end|bottom"
  73. android:layout_margin="16dp"
  74. android:tint="@color/white"
  75. app:srcCompat="@drawable/ic_add" />
  76. </FrameLayout>
  77. <android.support.design.widget.BottomNavigationView
  78. android:id="@+id/navigation"
  79. android:layout_width="match_parent"
  80. android:layout_height="wrap_content"
  81. android:layout_gravity="bottom"
  82. android:background="@color/white"
  83. app:menu="@menu/navigation" />
  84. </LinearLayout>