DT @22.08.2015: Refactoring, implementing search.. but still buggy

This commit is contained in:
Dennis Thießen
2015-08-22 14:33:53 +02:00
parent 5fb9f53be3
commit 00cc821499
20 changed files with 1002 additions and 649 deletions

View File

@@ -6,12 +6,21 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
<RelativeLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Welcome!"
android:id="@+id/textView2"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="52dp" />
</RelativeLayout>
<ListView
android:id="@+id/navList"

View File

@@ -0,0 +1,30 @@
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.deke.risk.riskahead.MapsActivity">
<RelativeLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment 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"
android:id="@+id/map"
tools:context=".MapsActivity"
android:name="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
<ListView
android:id="@+id/navList"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#ffeeee"/>
</android.support.v4.widget.DrawerLayout>

View File

@@ -1,8 +1,13 @@
<FrameLayout 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" tools:context="org.deke.risk.riskahead.fragments.UserInfo">
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.deke.risk.riskahead.UserConfigActivity">
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
@@ -52,4 +57,12 @@
</LinearLayout>
</FrameLayout>
<ListView
android:id="@+id/navList"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#ffeeee"/>
</android.support.v4.widget.DrawerLayout>

View File

@@ -1,29 +0,0 @@
<RelativeLayout 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"
tools:context="org.deke.risk.riskahead.fragments.MapFragment">
<Button
android:id="@+id/btn_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/find"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />
<EditText
android:id="@+id/et_place"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/hint"
android:inputType="text"
android:layout_toLeftOf="@id/btn_show" />
<fragment
android:id="@+id/location_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/et_place"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>

View File

@@ -1,9 +0,0 @@
<menu 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"
tools:context="org.deke.risk.riskahead.StartActivity">
<item android:id="@+id/settings_user" android:title="@string/settings_user"
android:orderInCategory="100" app:showAsAction="never" />
<item android:id="@+id/settings_logout" android:title="@string/settings_logout"
android:orderInCategory="100" app:showAsAction="never" />
</menu>

View File

@@ -0,0 +1,14 @@
<menu 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"
tools:context="org.deke.risk.riskahead.MapsActivity">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
<item android:id="@+id/location_search"
android:title="Search"
android:icon="@android:drawable/ic_menu_search"
app:showAsAction="always"
app:actionViewClass="android.support.v7.widget.SearchView" />
</menu>

View File

@@ -1,5 +1,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="org.deke.risk.riskahead.UserConfigActivity">
<item android:id="@+id/action_settings" android:title="@string/action_settings"
android:orderInCategory="100" app:showAsAction="never" />
</menu>

View File

@@ -31,4 +31,14 @@
<string name="settings_logout">Logout</string>
<string name="find">Find</string>
<string name="hint">Enter Place</string>
<string name="action_search">search</string>
<string name="app_label">Label</string>
<string name="search_hint">Hint</string>
<string name="title_activity_maps">RiskMap</string>
<string name="hello_world">Hello world!</string>
<string name="title_activity_base">Base</string>
<string name="title_activity_user_config">User Profile</string>
<string name="search_settings">search settings</string>
</resources>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:hint="@string/search_hint"
android:searchSettingsDescription="@string/search_settings"
android:searchSuggestAuthority="org.deke.risk.riskahead.helper.PlaceProvider"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:searchSuggestSelection=" ?"
android:searchSuggestThreshold="2" >
</searchable>