activity_directory.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?xml version="1.0" encoding="utf-8"?><!--
  2. ~ Copyright (c) 2018 Threema GmbH
  3. ~ All rights reserved.
  4. -->
  5. <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  6. xmlns:app="http://schemas.android.com/apk/res-auto"
  7. android:id="@+id/parent_layout"
  8. android:layout_width="match_parent"
  9. android:layout_height="match_parent">
  10. <include layout="@layout/toolbar_view" />
  11. <androidx.constraintlayout.widget.ConstraintLayout
  12. android:layout_width="match_parent"
  13. android:layout_height="@dimen/directory_search_bar_height"
  14. android:layout_gravity="top"
  15. android:paddingTop="8dp"
  16. android:paddingBottom="4dp"
  17. android:paddingLeft="16dp"
  18. android:paddingRight="8dp"
  19. android:background="?compose_container"
  20. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  21. <ch.threema.app.ui.ThreemaSearchView
  22. android:id="@+id/search"
  23. android:layout_width="0dp"
  24. android:layout_height="wrap_content"
  25. android:layout_marginRight="8dp"
  26. android:layout_gravity="center_vertical"
  27. android:background="?compose_edittext_bubble"
  28. android:textColor="?android:textColorPrimary"
  29. app:iconifiedByDefault="false"
  30. app:defaultQueryHint="@string/directory_search"
  31. app:layout_constraintHorizontal_chainStyle="spread_inside"
  32. app:layout_constraintHorizontal_weight="1"
  33. app:layout_constraintTop_toTopOf="parent"
  34. app:layout_constraintLeft_toLeftOf="parent"
  35. app:layout_constraintBottom_toBottomOf="parent"
  36. app:layout_constraintRight_toLeftOf="@+id/category_selector_button"/>
  37. <androidx.appcompat.widget.AppCompatImageButton
  38. style="?android:attr/borderlessButtonStyle"
  39. android:id="@+id/category_selector_button"
  40. android:layout_width="48dp"
  41. android:layout_height="48dp"
  42. android:layout_gravity="center_vertical|right"
  43. android:background="?android:selectableItemBackground"
  44. android:tint="?attr/textColorSecondary"
  45. app:srcCompat="@drawable/ic_filter_list_black_24dp"
  46. android:contentDescription="@string/work_select_categories"
  47. app:layout_constraintTop_toTopOf="parent"
  48. app:layout_constraintLeft_toRightOf="@id/search"
  49. app:layout_constraintBottom_toBottomOf="parent"
  50. app:layout_constraintRight_toRightOf="parent"
  51. app:layout_goneMarginLeft="0dp"
  52. app:layout_goneMarginRight="0dp"/>
  53. </androidx.constraintlayout.widget.ConstraintLayout>
  54. <LinearLayout
  55. android:layout_width="match_parent"
  56. android:layout_height="match_parent"
  57. android:layout_marginTop="@dimen/directory_search_bar_height"
  58. app:layout_behavior="@string/appbar_scrolling_view_behavior"
  59. android:orientation="vertical">
  60. <HorizontalScrollView
  61. android:layout_width="match_parent"
  62. android:layout_height="wrap_content"
  63. android:scrollbarSize="0dp"
  64. android:scrollbars="none">
  65. <com.google.android.material.chip.ChipGroup
  66. android:id="@+id/chip_group"
  67. android:layout_width="wrap_content"
  68. android:layout_height="wrap_content"
  69. android:paddingLeft="16dp"
  70. android:paddingTop="0dp"
  71. android:paddingRight="16dp"
  72. android:paddingBottom="-1dp"
  73. app:chipSpacingHorizontal="4dp"
  74. app:chipSpacingVertical="0dp"
  75. app:singleLine="true"
  76. android:visibility="gone" />
  77. </HorizontalScrollView>
  78. <FrameLayout
  79. android:layout_width="match_parent"
  80. android:layout_height="match_parent"
  81. android:layout_marginLeft="@dimen/tablet_additional_padding_left_right"
  82. android:layout_marginRight="@dimen/tablet_additional_padding_left_right"
  83. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  84. <ch.threema.app.ui.EmptyRecyclerView
  85. android:id="@+id/recycler"
  86. android:layout_width="match_parent"
  87. android:layout_height="match_parent"
  88. android:layout_marginTop="4dp"/>
  89. <TextView
  90. android:id="@+id/empty_text"
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:gravity="center_horizontal|center_vertical"
  94. android:layout_marginTop="16dp"
  95. android:paddingLeft="16dp"
  96. android:paddingRight="16dp"
  97. android:textAppearance="@style/Threema.TextAppearance.Emptyview"
  98. android:text="@string/directory_empty_view_text" />
  99. </FrameLayout>
  100. </LinearLayout>
  101. </androidx.coordinatorlayout.widget.CoordinatorLayout>