activity_share_location.xml

 1<layout xmlns:android="http://schemas.android.com/apk/res/android"
 2    xmlns:tools="http://schemas.android.com/tools">
 3
 4
 5    <RelativeLayout
 6        android:layout_width="match_parent"
 7        android:layout_height="match_parent"
 8        tools:context=".ui.ShareLocationActivity">
 9
10        <com.google.android.material.appbar.AppBarLayout
11            android:id="@+id/app_bar_layout"
12            android:layout_width="match_parent"
13            android:layout_height="wrap_content">
14
15            <com.google.android.material.appbar.MaterialToolbar
16                android:id="@+id/toolbar"
17                android:layout_width="match_parent"
18                android:layout_height="wrap_content"
19                android:minHeight="?attr/actionBarSize" />
20
21        </com.google.android.material.appbar.AppBarLayout>
22
23        <androidx.coordinatorlayout.widget.CoordinatorLayout
24
25            android:id="@+id/snackbar_coordinator"
26            android:layout_width="match_parent"
27            android:layout_height="match_parent"
28            android:layout_above="@+id/button_bar"
29            android:layout_below="@id/app_bar_layout">
30
31
32            <org.osmdroid.views.MapView
33                android:id="@+id/map"
34                android:layout_width="match_parent"
35                android:layout_height="match_parent" />
36
37            <com.google.android.material.floatingactionbutton.FloatingActionButton
38                android:id="@+id/fab"
39                android:layout_width="wrap_content"
40                android:layout_height="wrap_content"
41                android:layout_above="@+id/button_bar"
42                android:layout_alignParentEnd="true"
43                android:layout_gravity="end|bottom"
44                android:layout_margin="16dp"
45                android:contentDescription="@string/action_unfix_from_location"
46                android:src="@drawable/ic_gps_fixed_24dp" />
47
48        </androidx.coordinatorlayout.widget.CoordinatorLayout>
49
50        <RelativeLayout
51            android:id="@+id/button_bar"
52            android:layout_width="wrap_content"
53            android:layout_height="wrap_content"
54            android:layout_alignParentStart="true"
55            android:layout_alignParentEnd="true"
56            android:layout_alignParentBottom="true"
57            android:paddingHorizontal="16dp"
58            android:paddingVertical="8dp">
59
60            <Button
61                android:id="@+id/cancel_button"
62                style="@style/Widget.Material3.Button.TextButton"
63                android:layout_width="wrap_content"
64                android:layout_height="wrap_content"
65                android:layout_alignParentStart="true"
66                android:layout_centerInParent="true"
67                android:text="@string/cancel" />
68
69            <Button
70                android:id="@+id/share_button"
71                android:layout_width="wrap_content"
72                android:layout_height="wrap_content"
73                android:layout_alignParentEnd="true"
74                android:layout_centerInParent="true"
75                android:text="@string/share" />
76        </RelativeLayout>
77
78    </RelativeLayout>
79</layout>