Files
OpenTracks/src/main/res/layout/track_edit.xml
T
2025-06-25 19:44:38 +02:00

139 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010 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:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<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
style="?attr/textInputOutlinedStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:hint="@string/generic_name"
android:imeOptions="actionNext"
android:importantForAutofill="no">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/track_edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textCapSentences"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
style="?attr/textInputOutlinedExposedDropdownMenuStyle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_weight="1"
android:imeOptions="actionNext"
android:importantForAutofill="no">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/track_edit_activity_type_localized"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:hint="@string/track_edit_activity_type_hint"
android:imeOptions="actionNext"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<ImageView
android:id="@+id/track_edit_activity_type_icon"
tools:src="@drawable/ic_activity_bike_24dp"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="bottom" />
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
style="?attr/textInputOutlinedExposedDropdownMenuStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:imeOptions="actionNext"
android:importantForAutofill="no">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/track_edit_time_offset"
android:layout_width="match_parent"
android:inputType="none"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:hint="@string/track_edit_time_offset"
android:imeOptions="actionNext"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
style="?attr/textInputOutlinedStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:hint="@string/generic_description"
android:imeOptions="actionNext"
android:importantForAutofill="no">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/track_edit_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textMultiLine"
android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</ScrollView>
<View style="@style/BottomButtonDivider" />
<LinearLayout style="@style/BottomButtonBar">
<Button
android:id="@+id/track_edit_cancel"
style="@style/BottomButton"
android:layout_gravity="start"
android:text="@android:string/cancel" />
<Button
android:id="@+id/track_edit_save"
style="@style/BottomButton"
android:layout_gravity="end"
android:text="@string/generic_save" />
</LinearLayout>
</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>