PoiSearchActivity sample: add search by tag (#579)

This commit is contained in:
Gustl22
2018-09-02 14:45:01 +02:00
committed by Emux
parent 7a7ceb6d60
commit da09a62605
5 changed files with 246 additions and 9 deletions

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.oscim.android.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ToggleButton
android:id="@+id/toggleControls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|start"
android:onClick="onToggleControls" />
<LinearLayout
android:id="@+id/controls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#bb000000"
android:orientation="vertical"
android:padding="10dp"
android:visibility="gone">
<ListView
android:id="@+id/search_list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/add_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add" />
<Button
android:id="@+id/start_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/key"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="@string/search_key"
android:inputType="text"
android:maxLines="1"
android:textColor="@android:color/white" />
<EditText
android:id="@+id/value"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="@string/search_value"
android:inputType="text"
android:maxLines="1"
android:textColor="@android:color/white" />
<Button
android:id="@+id/remove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/remove" />
</LinearLayout>

View File

@@ -7,10 +7,6 @@
<string name="theme_tubes">Tubes</string>
<string name="theme_newtron">NewTron</string>
<string name="theme_external">External theme</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="error">Error</string>
<string name="file_invalid">The selected file is invalid.</string>
<string name="styler_mode_line">Line</string>
<string name="styler_mode_area">Area</string>
<string name="styler_mode_outline">Outline</string>
@@ -19,5 +15,14 @@
<string name="style_2">Hide nature</string>
<string name="menu_gridlayer">Grid</string>
<string name="dialog_reverse_geocoding_title">Reverse Geocoding</string>
<string name="add">Add</string>
<string name="cancel">Cancel</string>
<string name="error">Error</string>
<string name="file_invalid">The selected file is invalid.</string>
<string name="ok">OK</string>
<string name="remove">Remove</string>
<string name="search">Search</string>
<string name="search_key">\'*\' or OSM key</string>
<string name="search_value">void or value</string>
</resources>