Files
OpenTracks/src/main/res/layout/marker_edit.xml
T
Dennis Guse b50965f0e8 Bugfix: AppBarLayout needs inset (edge-to-edge)
Part of #2008 and #1955 (Android 15 upgrade).
2024-11-19 18:38:47 +01:00

159 lines
7.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/marker_edit_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:navigationIcon="@drawable/ic_marker_add_24dp"
app:title="@string/menu_insert_marker" />
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginBottom="102dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<ScrollView style="@style/ScrollView.WithBottomButtons">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="8dp">
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textInputOutlinedStyle"
android:hint="@string/generic_name"
android:imeOptions="actionNext"
android:importantForAutofill="no"
android:layout_marginBottom="16dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/marker_edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_marker_orange_pushpin_with_shadow"
android:inputType="textCapSentences"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textInputOutlinedExposedDropdownMenuStyle"
android:imeOptions="actionNext"
android:importantForAutofill="no"
android:layout_marginBottom="16dp">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/marker_edit_marker_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/marker_edit_marker_type"
android:imeOptions="actionNext"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="?attr/textInputOutlinedStyle"
android:hint="@string/generic_description"
android:imeOptions="actionNext"
android:importantForAutofill="no"
android:layout_marginBottom="16dp">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/marker_edit_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp">
<ImageView
android:id="@+id/marker_edit_photo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:adjustViewBounds="true"
android:contentDescription="@string/image_photo_marker"
android:scaleType="fitStart" />
<ImageView
android:id="@+id/marker_edit_photo_delete"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/shape_circle_darkgray"
android:padding="4dp"
android:src="@drawable/ic_delete_forever_24dp" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/marker_edit_cancel"
style="@style/BottomButton"
android:layout_gravity="start"
android:text="@android:string/cancel" />
<Button
android:id="@+id/marker_edit_done"
style="@style/BottomButton"
android:layout_gravity="end" />
</LinearLayout>
</LinearLayout>
<include
android:id="@+id/bottom_app_bar_layout"
layout="@layout/bottomappbar" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>