OsmAnd/OsmAnd/res/layout/fragment_edit_poi.xml

180 lines
8 KiB
XML
Raw Normal View History

2015-08-18 17:06:20 +02:00
<LinearLayout
2015-08-12 16:42:04 +02:00
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/spinnerListBackground"
2015-09-04 18:29:28 +02:00
android:clickable="true"
2015-08-12 16:42:04 +02:00
android:orientation="vertical"
tools:context="net.osmand.plus.osmedit.EditPoiDialogFragment">
2015-09-04 18:29:28 +02:00
2020-03-04 15:12:06 +01:00
<androidx.appcompat.widget.Toolbar
2015-08-26 19:44:04 +02:00
android:id="@+id/toolbar"
android:layout_width="fill_parent"
android:layout_height="@dimen/dashboard_map_toolbar"
2015-09-04 18:29:28 +02:00
android:background="?attr/pstsTabBackground"
2015-08-26 19:44:04 +02:00
android:minHeight="@dimen/dashboard_map_toolbar"
2015-09-04 18:29:28 +02:00
android:theme="?attr/toolbar_theme"
2020-02-24 15:17:23 +01:00
app:contentInsetLeft="@dimen/settings_divider_margin_start"
2020-04-28 09:54:54 +02:00
app:contentInsetStart="@dimen/settings_divider_margin_start"
app:contentInsetRight="0dp"
app:contentInsetEnd="0dp"/>
2015-08-12 16:42:04 +02:00
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<LinearLayout
2015-08-12 16:42:04 +02:00
android:layout_width="match_parent"
android:layout_height="0dp"
2015-08-18 17:06:20 +02:00
android:orientation="vertical">
2020-03-04 15:12:06 +01:00
<com.google.android.material.appbar.AppBarLayout
2015-08-18 17:06:20 +02:00
android:layout_width="match_parent"
2015-08-12 16:42:04 +02:00
android:layout_height="wrap_content"
2015-09-04 18:29:28 +02:00
android:background="?attr/pstsTabBackground"
android:theme="?attr/appbar_layout_theme">
2015-08-18 17:06:20 +02:00
<!-- TODO change theme -->
<LinearLayout
android:layout_width="fill_parent"
2015-08-12 16:42:04 +02:00
android:layout_height="wrap_content"
2015-08-18 17:06:20 +02:00
app:layout_scrollFlags="scroll">
2015-08-14 13:12:59 +02:00
2020-03-04 15:12:06 +01:00
<com.google.android.material.textfield.TextInputLayout
2015-08-14 13:12:59 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2018-05-23 16:43:25 +02:00
android:hint="@string/shared_string_name"
android:importantForAutofill="noExcludeDescendants"
2020-02-24 15:17:23 +01:00
android:layout_marginLeft="@dimen/settings_divider_margin_start"
android:layout_marginRight="@dimen/content_padding"
2020-02-25 11:15:01 +01:00
android:layout_marginStart="@dimen/settings_divider_margin_start"
android:layout_marginEnd="@dimen/content_padding">
2015-08-12 16:42:04 +02:00
2015-08-18 17:06:20 +02:00
<EditText
android:id="@+id/poiNameEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2015-10-26 14:48:48 +01:00
android:imeOptions="actionNext"
2018-05-23 16:43:25 +02:00
android:importantForAutofill="noExcludeDescendants"
android:inputType="textCapSentences"
2015-08-18 17:06:20 +02:00
tools:text="@string/lorem_ipsum"/>
2015-08-12 16:42:04 +02:00
2020-03-04 15:12:06 +01:00
</com.google.android.material.textfield.TextInputLayout>
2015-08-18 17:06:20 +02:00
</LinearLayout>
2015-08-12 16:42:04 +02:00
2015-08-18 17:06:20 +02:00
<LinearLayout
android:layout_width="match_parent"
2015-08-12 16:42:04 +02:00
android:layout_height="wrap_content"
2020-02-24 15:17:23 +01:00
android:layout_marginBottom="@dimen/content_padding_half"
2015-08-18 17:06:20 +02:00
app:layout_scrollFlags="scroll">
<!--android:layout_marginLeft="72dp"-->
<ImageButton
android:id="@+id/poiTypeButton"
android:contentDescription="@string/poi_dialog_poi_type"
2020-02-24 15:17:23 +01:00
android:layout_width="@dimen/context_menu_buttons_bottom_height"
android:layout_height="@dimen/context_menu_buttons_bottom_height"
2015-08-18 17:06:20 +02:00
android:layout_gravity="bottom"
android:background="@null"
app:srcCompat="@drawable/ic_action_label"/>
2015-08-12 16:42:04 +02:00
2020-03-04 15:12:06 +01:00
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/poiTypeTextInputLayout"
2015-08-18 17:06:20 +02:00
android:layout_width="0dp"
2015-08-12 16:42:04 +02:00
android:layout_height="wrap_content"
2018-05-23 16:43:25 +02:00
android:hint="@string/poi_dialog_poi_type"
android:importantForAutofill="noExcludeDescendants"
2015-08-18 17:06:20 +02:00
android:layout_marginLeft="24dp"
2020-02-24 15:17:23 +01:00
android:layout_weight="1"
2020-02-25 11:15:01 +01:00
android:layout_marginStart="24dp">
2015-08-18 17:06:20 +02:00
<AutoCompleteTextView
android:id="@+id/poiTypeEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2015-09-04 18:29:28 +02:00
android:completionThreshold="1"
2020-05-19 11:02:51 +02:00
app:drawableRightCompat="@drawable/ic_action_arrow_drop_down"
app:drawableEndCompat="@drawable/ic_action_arrow_drop_down"
2018-05-23 16:43:25 +02:00
android:importantForAutofill="noExcludeDescendants"
2015-09-29 16:18:23 +02:00
android:imeOptions="actionSend"
android:inputType="text"
2020-05-19 11:02:51 +02:00
tools:text="@string/lorem_ipsum" />
2015-08-18 17:06:20 +02:00
2020-03-04 15:12:06 +01:00
</com.google.android.material.textfield.TextInputLayout>
2015-08-18 17:06:20 +02:00
<ImageButton
android:id="@+id/onlineDocumentationButton"
android:contentDescription="@string/shared_string_help"
2020-02-24 15:17:23 +01:00
android:layout_width="@dimen/context_menu_buttons_bottom_height"
android:layout_height="@dimen/context_menu_buttons_bottom_height"
2015-08-18 17:06:20 +02:00
android:layout_gravity="bottom"
android:background="@null"
2015-08-31 16:31:25 +02:00
tools:src="@drawable/ic_action_help"/>
2015-08-18 17:06:20 +02:00
</LinearLayout>
2020-03-04 15:12:06 +01:00
<com.google.android.material.tabs.TabLayout
2015-08-18 17:06:20 +02:00
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
2015-09-04 18:29:28 +02:00
app:layout_scrollFlags="scroll"
2015-12-30 11:28:13 +01:00
app:tabIndicatorColor="@color/osmand_orange"
app:tabSelectedTextColor="@color/osmand_orange"
2015-09-04 18:29:28 +02:00
app:tabTextColor="@android:color/darker_gray"/>
2020-03-04 15:12:06 +01:00
</com.google.android.material.appbar.AppBarLayout>
2015-08-18 17:06:20 +02:00
<net.osmand.plus.osmedit.EditPoiViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</ScrollView>
2015-08-18 17:06:20 +02:00
<View
android:id="@+id/buttonDivider"
2015-08-12 16:42:04 +02:00
android:layout_width="match_parent"
2015-08-18 17:06:20 +02:00
android:layout_height="1dp"
2015-09-23 17:24:28 +02:00
android:background="?attr/divider_color"/>
2015-08-18 17:06:20 +02:00
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
2020-02-24 15:17:23 +01:00
android:gravity="end">
2015-08-18 17:06:20 +02:00
2018-01-17 17:31:07 +01:00
<net.osmand.plus.widgets.ButtonEx
android:id="@+id/deleteButton"
style="@style/DashboardGeneralButton"
2020-02-24 15:17:23 +01:00
android:layout_height="@dimen/context_menu_buttons_bottom_height"
2018-01-17 17:31:07 +01:00
android:layout_marginLeft="@dimen/showAllButtonMarginRight"
android:gravity="center"
android:text="@string/shared_string_delete"
android:visibility="gone"
app:textAllCapsCompat="true"
2020-02-24 15:17:23 +01:00
tools:visibility="visible"
2020-02-25 11:15:01 +01:00
android:layout_marginStart="@dimen/showAllButtonMarginRight" />
2018-01-17 17:31:07 +01:00
<Space
android:layout_width="0dp"
2020-02-24 15:17:23 +01:00
android:layout_height="@dimen/context_menu_buttons_bottom_height"
2018-01-17 17:31:07 +01:00
android:layout_weight="1"/>
2015-08-28 09:54:30 +02:00
<net.osmand.plus.widgets.ButtonEx
2015-08-18 17:06:20 +02:00
android:id="@+id/cancelButton"
2015-08-31 16:31:25 +02:00
style="@style/DashboardGeneralButton"
2020-02-24 15:17:23 +01:00
android:layout_height="@dimen/context_menu_buttons_bottom_height"
2015-08-31 16:31:25 +02:00
android:gravity="center"
2015-09-04 18:29:28 +02:00
android:text="@string/shared_string_cancel"
2015-08-28 09:54:30 +02:00
app:textAllCapsCompat="true"/>
2015-08-18 17:06:20 +02:00
2015-08-28 09:54:30 +02:00
<net.osmand.plus.widgets.ButtonEx
2015-08-18 17:06:20 +02:00
android:id="@+id/saveButton"
2015-08-31 16:31:25 +02:00
style="@style/DashboardGeneralButton"
2020-02-24 15:17:23 +01:00
android:layout_height="@dimen/context_menu_buttons_bottom_height"
2015-08-31 16:31:25 +02:00
android:gravity="center"
2015-09-04 18:29:28 +02:00
app:textAllCapsCompat="true"
tools:text="Save"/>
2015-08-18 17:06:20 +02:00
</LinearLayout>
</LinearLayout>