PoiSearchActivity sample: add search by tag (#579)
This commit is contained in:
58
vtm-android-example/res/layout/activity_map_poi.xml
Normal file
58
vtm-android-example/res/layout/activity_map_poi.xml
Normal 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>
|
||||
33
vtm-android-example/res/layout/item_poi_search.xml
Normal file
33
vtm-android-example/res/layout/item_poi_search.xml
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user