Improve the default activity type preference

This commit is contained in:
Jimmy Shih
2013-11-20 17:49:15 -08:00
parent 0d65e5cafc
commit 41f5206c63
8 changed files with 237 additions and 85 deletions
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2013 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="16dp" >
<AutoCompleteTextView
android:hint="@string/track_edit_activity_type_hint"
android:id="@+id/activity_type_preference_text_view"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_width="0dp"
style="@style/EditCategory" />
<Spinner
android:id="@+id/activity_type_preference_spinner"
android:layout_gravity="bottom"
android:layout_height="wrap_content"
android:layout_width="wrap_content" />
</LinearLayout>
+1
View File
@@ -57,6 +57,7 @@ limitations under the License.
android:hint="@string/marker_edit_marker_type_hint"
android:id="@+id/marker_edit_waypoint_marker_type"
android:imeOptions="actionNext"
android:layout_width="match_parent"
style="@style/EditCategory" />
<TextView
android:text="@string/generic_description"
-2
View File
@@ -40,11 +40,9 @@ limitations under the License.
android:layout_height="wrap_content"
android:layout_width="match_parent" >
<AutoCompleteTextView
android:gravity="bottom"
android:hint="@string/track_edit_activity_type_hint"
android:id="@+id/track_edit_activity_type"
android:imeOptions="actionNext"
android:layout_gravity="bottom"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_width="0dp"
+3
View File
@@ -39,6 +39,9 @@ limitations under the License.
</style>
<!-- edit category -->
<style name="EditCategory" parent="@style/TextMedium">
<item name="android:completionThreshold">1</item>
<item name="android:gravity">bottom</item>
<item name="android:layout_gravity">bottom</item>
<item name="android:layout_width">match_parent</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">true</item>
+1 -2
View File
@@ -28,9 +28,8 @@ limitations under the License.
android:defaultValue="@string/settings_recording_track_name_location_value"
android:key="@string/track_name_key"
android:title="@string/settings_recording_track_name_title" />
<com.google.android.apps.mytracks.AutoCompleteTextPreference
<com.google.android.apps.mytracks.ActivityTypePreference
android:defaultValue=""
android:hint="@string/track_edit_activity_type_hint"
android:key="@string/default_activity_key"
android:title="@string/settings_recording_default_activity_title" />
<com.google.android.apps.mytracks.IntegerListPreference