activity_location_picker.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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:id="@+id/coordinator"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. android:fitsSystemWindows="true">
  9. <com.google.android.material.appbar.AppBarLayout
  10. android:id="@+id/appbar"
  11. android:layout_width="match_parent"
  12. android:layout_height="wrap_content"
  13. android:fitsSystemWindows="true">
  14. <com.google.android.material.appbar.CollapsingToolbarLayout
  15. android:id="@+id/collapsingToolbarLayout"
  16. android:layout_width="match_parent"
  17. android:layout_height="match_parent"
  18. app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
  19. app:titleEnabled="false">
  20. <androidx.constraintlayout.widget.ConstraintLayout
  21. android:layout_width="match_parent"
  22. android:layout_height="match_parent"
  23. android:background="?android:attr/colorBackground"
  24. android:fitsSystemWindows="true"
  25. app:layout_collapseMode="parallax"
  26. app:layout_collapseParallaxMultiplier="0.4">
  27. <FrameLayout
  28. android:id="@+id/map_container"
  29. android:layout_width="match_parent"
  30. android:layout_height="0dp"
  31. app:layout_constraintBottom_toTopOf="@+id/send_location_container"
  32. app:layout_constraintLeft_toLeftOf="parent"
  33. app:layout_constraintTop_toTopOf="parent">
  34. <com.mapbox.mapboxsdk.maps.MapView
  35. android:id="@+id/map"
  36. app:maplibre_cameraZoom="16"
  37. app:maplibre_uiCompass="false"
  38. android:layout_width="match_parent"
  39. android:layout_height="match_parent"/>
  40. <ImageView
  41. android:layout_width="wrap_content"
  42. android:layout_height="wrap_content"
  43. android:layout_gravity="center"
  44. android:layout_marginBottom="22dp"
  45. android:clickable="false"
  46. android:focusable="false"
  47. app:srcCompat="@drawable/ic_map_center_marker"
  48. android:contentDescription="@string/location_placeholder"/>
  49. <TextView
  50. style="@style/Threema.TextAppearance.BodyMedium"
  51. android:layout_width="wrap_content"
  52. android:layout_height="wrap_content"
  53. android:layout_gravity="left|bottom"
  54. android:textSize="11dp"
  55. android:paddingTop="2dp"
  56. android:paddingBottom="2dp"
  57. android:paddingLeft="4dp"
  58. android:paddingRight="4dp"
  59. android:background="#AAFFFFFF"
  60. android:textColor="#FF111111"
  61. android:text="@string/lp_map_copyright"/>
  62. </FrameLayout>
  63. <com.google.android.material.button.MaterialButton
  64. style="@style/Threema.MaterialButton.Icon.Circle.Filled"
  65. android:id="@+id/center_map"
  66. android:layout_width="wrap_content"
  67. android:layout_height="wrap_content"
  68. android:layout_marginRight="@dimen/lp_default_margin"
  69. android:layout_marginBottom="@dimen/lp_default_margin"
  70. app:layout_constraintBottom_toBottomOf="@id/map_container"
  71. app:layout_constraintRight_toRightOf="@id/map_container"
  72. app:icon="@drawable/ic_gps_fixed"
  73. app:backgroundTint="?attr/colorSurface"
  74. app:iconTint="?attr/colorOnSurface"
  75. android:elevation="1dp"
  76. tools:ignore="ContentDescription" />
  77. <FrameLayout
  78. android:id="@+id/send_location_container"
  79. android:layout_width="match_parent"
  80. android:layout_height="@dimen/send_location_container_height"
  81. app:layout_constraintBottom_toBottomOf="parent"
  82. app:layout_constraintLeft_toLeftOf="parent"
  83. app:layout_constraintLeft_toRightOf="parent"
  84. android:background="?attr/selectableItemBackground"
  85. android:contentDescription="@string/lp_select_this_place"
  86. android:clickable="true"
  87. android:focusable="true">
  88. <ImageView
  89. android:id="@+id/send_location_icon"
  90. android:layout_width="@dimen/lp_icon_size_small"
  91. android:layout_height="@dimen/lp_icon_size_small"
  92. android:layout_marginLeft="@dimen/lp_guide_start_margin"
  93. android:contentDescription="@string/lp_select_this_place"
  94. android:layout_gravity="left|center_vertical"
  95. app:srcCompat="@drawable/ic_map_marker_outline"
  96. app:tint="?attr/colorOnSurface"
  97. android:clickable="false"/>
  98. <TextView
  99. style="@style/Threema.TextAppearance.Subtitle"
  100. android:id="@+id/send_location_text"
  101. android:layout_width="wrap_content"
  102. android:layout_height="wrap_content"
  103. android:layout_marginLeft="@dimen/lp_guide_content_margin"
  104. android:text="@string/lp_select_this_place"
  105. android:textColor="?attr/colorOnBackground"
  106. android:layout_gravity="left|center_vertical"
  107. android:clickable="false"/>
  108. <com.google.android.material.progressindicator.CircularProgressIndicator
  109. android:id="@+id/loading_progressbar"
  110. android:layout_width="@dimen/lp_icon_size_small"
  111. android:layout_height="@dimen/lp_icon_size_small"
  112. android:layout_marginRight="@dimen/lp_guide_end_margin"
  113. android:indeterminate="true"
  114. android:visibility="gone"
  115. android:layout_gravity="right|center_vertical"
  116. app:showDelay="500"
  117. app:minHideDelay="500"/>
  118. </FrameLayout>
  119. </androidx.constraintlayout.widget.ConstraintLayout>
  120. <com.google.android.material.appbar.MaterialToolbar
  121. android:id="@+id/toolbar"
  122. android:layout_width="match_parent"
  123. android:layout_height="?attr/actionBarSize"
  124. app:layout_collapseMode="pin"
  125. app:title="@string/send_location" />
  126. <com.google.android.material.card.MaterialCardView
  127. android:id="@+id/search_container"
  128. android:layout_width="match_parent"
  129. android:layout_height="@dimen/lp_card_search_height"
  130. android:layout_marginLeft="@dimen/lp_card_search_margin_horizontal"
  131. android:layout_marginTop="@dimen/lp_card_search_margin_top"
  132. android:layout_marginRight="@dimen/lp_card_search_margin_horizontal"
  133. app:cardCornerRadius="@dimen/edittext_bubble_border_radius"
  134. app:cardBackgroundColor="?android:attr/colorBackground"
  135. app:cardElevation="1dp"
  136. app:strokeWidth="0dp"
  137. app:layout_collapseMode="parallax"
  138. app:layout_collapseParallaxMultiplier="0.7">
  139. <ImageView
  140. android:layout_width="wrap_content"
  141. android:layout_height="wrap_content"
  142. android:layout_gravity="center_vertical"
  143. android:layout_marginLeft="@dimen/lp_card_search_content_start_margin"
  144. android:contentDescription="@string/search"
  145. app:tint="?attr/colorOnSurface"
  146. app:srcCompat="@drawable/ic_search_outline" />
  147. <TextView
  148. android:layout_width="wrap_content"
  149. android:layout_height="wrap_content"
  150. android:layout_gravity="center_vertical"
  151. android:layout_marginLeft="@dimen/lp_card_search_content_margin"
  152. android:text="@string/search"
  153. android:textAppearance="@style/Threema.TextAppearance.BodyLarge"
  154. android:textColor="?attr/colorOnSurface" />
  155. </com.google.android.material.card.MaterialCardView>
  156. </com.google.android.material.appbar.CollapsingToolbarLayout>
  157. </com.google.android.material.appbar.AppBarLayout>
  158. <androidx.core.widget.NestedScrollView
  159. android:layout_width="match_parent"
  160. android:layout_height="match_parent"
  161. android:background="?attr/colorOnSurfaceInverse"
  162. app:layout_behavior="@string/appbar_scrolling_view_behavior">
  163. <LinearLayout
  164. android:layout_width="match_parent"
  165. android:layout_height="match_parent"
  166. android:orientation="vertical">
  167. <TextView
  168. android:id="@+id/poi_list_description"
  169. android:layout_width="match_parent"
  170. android:layout_height="wrap_content"
  171. android:layout_marginLeft="@dimen/lp_guide_start_margin"
  172. android:layout_marginTop="@dimen/lp_default_margin"
  173. android:layout_marginBottom="8dp"
  174. android:text="@string/lp_or_select_nearby"
  175. android:textAppearance="@style/Threema.TextAppearance.BodyMedium"
  176. android:textColor="?attr/colorOnSurface" />
  177. <ch.threema.app.ui.EmptyRecyclerView
  178. android:id="@+id/poi_list"
  179. android:layout_width="match_parent"
  180. android:layout_height="match_parent"
  181. app:layout_behavior="@string/appbar_scrolling_view_behavior"
  182. tools:listitem="@layout/item_location_picker_place" />
  183. </LinearLayout>
  184. </androidx.core.widget.NestedScrollView>
  185. </androidx.coordinatorlayout.widget.CoordinatorLayout>