apps-android-commons/app/src/main/res/layout/fragment_explore_map.xml
samimshoaib01 6aeb3c07cc
Some checks are pending
Android CI / Run tests and generate APK (push) Waiting to run
ui: make recenter FAB theme-aware using Material attributes (#6281)
2025-04-12 21:05:42 +05:30

82 lines
3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- I have done this intentionally, the mapview because of some elevation or something,
sometimes hangs over the drawer layout and sometimes draws its onPaused state over the contributions, this seems to be the probable fix -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/container">
<org.osmdroid.views.MapView
android:id="@+id/map_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_recenter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:clickable="true"
android:focusable="true"
android:visibility="visible"
app:backgroundTint="?attr/colorSurface"
app:elevation="@dimen/dimen_6"
app:fabSize="normal"
app:srcCompat="@drawable/ic_my_location_black_24dp"
app:tint="?attr/colorOnSurface"
app:useCompatPadding="true" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_attribution"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_margin="8dp"
android:text="@string/map_attribution"
android:textAlignment="center"
android:textSize="10sp"
android:textStyle="bold" />
</RelativeLayout>
<Button
android:id="@+id/search_this_area_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/activity_margin_horizontal"
android:background="@color/white"
android:padding="@dimen/activity_margin_horizontal"
android:singleLine="true"
android:text="@string/search_this_area"
android:textColor="@color/status_bar_blue"
android:visibility="gone"
app:elevation="@dimen/dimen_6" />
<include
android:id="@+id/bottom_sheet_details_binding"
layout="@layout/bottom_sheet_details_explore" />
<ProgressBar
android:id="@+id/map_progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
app:elevation="@dimen/dimen_6" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>