- use a dialog to insert markers with an option to open full insert screen

- remember the last chosen marker type
- auto increment the default marker name
- fix IME option when toggling between marker type
- add more spacing between items in the editor
- rename WaypointType to WAYPOINT and STATISTICS
- rename to ListItemUtils
- remove unused appwidget_text color
This commit is contained in:
Jimmy Shih
2012-04-27 09:48:01 -07:00
parent 2ec090354b
commit 1a23ba673c
26 changed files with 478 additions and 207 deletions
+46
View File
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2012 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.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/ScrollView" >
<RelativeLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:padding="8dp" >
<RadioGroup
android:id="@+id/marker_add_type"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<RadioButton
android:id="@+id/marker_add_statistics"
android:text="@string/marker_statistics"
style="@style/TextMedium" />
<RadioButton
android:id="@+id/marker_add_waypoint"
android:text="@string/marker_waypoint"
style="@style/TextMedium" />
</RadioGroup>
<Button
android:id="@+id/marker_add_more_options"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/generic_more_options" />
</RelativeLayout>
</ScrollView>
+2 -2
View File
@@ -30,10 +30,10 @@ limitations under the License.
android:layout_width="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/marker_detail_marker_type"
android:id="@+id/marker_detail_waypoint_marker_type"
style="@style/TextLarge" />
<TextView
android:id="@+id/marker_detail_description"
android:id="@+id/marker_detail_waypoint_description"
style="@style/TextLarge" />
</LinearLayout>
<TableLayout
+31 -17
View File
@@ -30,48 +30,62 @@ limitations under the License.
android:layout_width="fill_parent"
android:orientation="vertical" >
<TextView
android:text="@string/marker_edit_type"
style="@style/TextMedium" />
android:text="@string/marker_type"
style="@style/EditLabel" />
<RadioGroup
android:id="@+id/marker_edit_type"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<RadioButton
android:id="@+id/marker_edit_type_statistics"
android:text="@string/marker_edit_type_statistics"
android:id="@+id/marker_edit_statistics"
android:text="@string/marker_statistics"
style="@style/TextMedium" />
<RadioButton
android:id="@+id/marker_edit_type_waypoint"
android:text="@string/marker_edit_type_waypoint"
android:id="@+id/marker_edit_waypoint"
android:text="@string/marker_waypoint"
style="@style/TextMedium" />
</RadioGroup>
</LinearLayout>
<TextView
android:text="@string/generic_name"
style="@style/TextMedium" />
<EditText
android:hint="@string/generic_name"
android:id="@+id/marker_edit_name"
style="@style/EditName" />
style="@style/EditLabel" />
<LinearLayout
android:id="@+id/marker_edit_statistics_section"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical" >
<EditText
android:drawableLeft="@drawable/yellow_pushpin"
android:hint="@string/generic_name"
android:id="@+id/marker_edit_statistics_name"
android:imeOptions="actionDone"
style="@style/EditName" />
</LinearLayout>
<LinearLayout
android:id="@+id/marker_edit_waypoint_section"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical" >
<EditText
android:drawableLeft="@drawable/blue_pushpin"
android:hint="@string/generic_name"
android:id="@+id/marker_edit_waypoint_name"
android:imeOptions="actionNext"
style="@style/EditName" />
<TextView
android:text="@string/marker_edit_marker_type"
style="@style/TextMedium" />
android:text="@string/marker_edit_waypoint_marker_type"
style="@style/EditLabel.WithPaddingTop" />
<AutoCompleteTextView
android:hint="@string/marker_edit_marker_type_hint"
android:id="@+id/marker_edit_marker_type"
android:hint="@string/marker_edit_waypoint_marker_type_hint"
android:id="@+id/marker_edit_waypoint_marker_type"
android:imeOptions="actionNext"
style="@style/EditCategory" />
<TextView
android:text="@string/generic_description"
style="@style/TextMedium" />
style="@style/EditLabel.WithPaddingTop" />
<EditText
android:hint="@string/generic_description"
android:id="@+id/marker_edit_description"
android:id="@+id/marker_edit_waypoint_description"
android:imeOptions="actionDone"
style="@style/EditDescription" />
</LinearLayout>
+3 -3
View File
@@ -26,7 +26,7 @@ limitations under the License.
android:padding="8dp" >
<TextView
android:text="@string/generic_name"
style="@style/TextMedium" />
style="@style/EditLabel" />
<EditText
android:drawableLeft="@drawable/track"
android:hint="@string/generic_name"
@@ -35,7 +35,7 @@ limitations under the License.
style="@style/EditName" />
<TextView
android:text="@string/track_edit_activity_type"
style="@style/TextMedium" />
style="@style/EditLabel.WithPaddingTop" />
<AutoCompleteTextView
android:hint="@string/track_edit_activity_type_hint"
android:id="@+id/track_edit_activity_type"
@@ -43,7 +43,7 @@ limitations under the License.
style="@style/EditCategory" />
<TextView
android:text="@string/generic_description"
style="@style/TextMedium" />
style="@style/EditLabel.WithPaddingTop" />
<EditText
android:hint="@string/generic_description"
android:id="@+id/track_edit_description"
-1
View File
@@ -46,7 +46,6 @@ limitations under the License.
<color name="power_fill">#40401465</color>
<!-- AppWidget colors -->
<color name="appwidget_text">#EDEDED</color>
<color name="appwidget_hr">#99999999</color>
<!-- Colors for dynamic track drawing -->
+1
View File
@@ -35,6 +35,7 @@ limitations under the License.
<string name="min_recording_interval_key">minRecordingInterval</string>
<string name="min_required_accuracy_key">minRequiredAccuracy</string>
<string name="pick_existing_map_key">pickExistingMap</string>
<string name="pick_statistics_marker_key">pickStatisticsMarker</string>
<string name="preferred_account_key">preferredAccount</string>
<string name="recording_track_id_key">recordingTrackId</string>
<string name="report_speed_key">reportSpeed</string>
+59 -45
View File
@@ -654,6 +654,10 @@ limitations under the License.
</string>
<!-- Generic Strings -->
<string name="generic_add"
translation_description="The text on a button to say add.">
Add
</string>
<string name="generic_cancel"
translation_description="The text on a button to say cancel.">
Cancel
@@ -670,6 +674,10 @@ limitations under the License.
translation_description="The title on an alert dialog indicating error.">
Error
</string>
<string name="generic_more_options"
translation_description="The text on a button to say more options.">
More options
</string>
<string name="generic_name"
translation_description="The text label for entering a name.">
Name
@@ -951,67 +959,47 @@ limitations under the License.
</string>
<!-- Marker -->
<string name="marker_add_error"
translation_description="When adding a marker, the message indicating error.">
Unable to insert a marker. Try again.
</string>
<string name="marker_add_success"
translation_description="When adding a marker, the message indicating success.">
A marker was inserted.
</string>
<string name="marker_delete_one_marker_confirm_message"
translation_description="When deleting a marker, the confirmation dialog message informing the
user that the marker will be permanently deleted from the phone.">
The marker will be permanently deleted from the phone.
</string>
<string name="marker_detail_description"
translation_description="In the marker detail page, the label for the description.
<string name="marker_detail_name"
translation_description="In the marker detail page, the label for the marker name.
%1$s marker name. E.g., 'Waypoint 1'.">
Name: %1$s
</string>
<string name="marker_detail_waypoint_description"
translation_description="In the marker detail page, the label for the waypoint description.
%1$s marker description. E.g., 'At the top'.">
Description: %1$s
</string>
<string name="marker_detail_marker_type"
translation_description="In the marker detail page, the label for the marker type.
<string name="marker_detail_waypoint_marker_type"
translation_description="In the marker detail page, the label for the waypoint marker type.
%1$s marker type. E.g., 'building'.">
Marker type: %1$s
</string>
<string name="marker_detail_name"
translation_description="In the marker detail page, the label for the marker name.
%1$s marker name. E.g., 'Waypoint1'.">
Name: %1$s
</string>
<string name="marker_edit_add"
translation_description="The label on the button to add a marker.">
Add
</string>
<string name="marker_edit_add_error"
translation_description="When adding a marker, the message indicating error.">
Unable to insert a marker. Try again.
</string>
<string name="marker_edit_add_success"
translation_description="When adding a marker, the message indicating success.">
A marker was inserted.
</string>
<string name="marker_edit_add_title"
translation_description="The title of the page to add a new marker.">
New Marker
</string>
<string name="marker_edit_marker_type"
translation_description="The label for the text field to edit the marker type, including some
exmaples.">
<string name="marker_edit_waypoint_marker_type"
translation_description="In the marker edit page, the label for the waypoint marker type,
including some exmaples.">
Marker type (e.g. building, pothole...)
</string>
<string name="marker_edit_marker_type_hint"
translation_description="The hint in the 'Marker type' text field when it is empty.">
<string name="marker_edit_waypoint_marker_type_hint"
translation_description="In the marker edit page, the hint in the waypoint marker type text
field when it is empty.">
Marker type
</string>
<string name="marker_edit_type"
translation_description="When adding a marker, the label to select a type, statistics or
waypoint.">
Type
</string>
<string name="marker_edit_type_statistics"
translation_description="The label to add a statistics marker.">
Statistics
</string>
<string name="marker_edit_type_waypoint"
translation_description="The label to add a waypoint marker.">
Waypoint
</string>
</string>
<string name="marker_label_end"
translation_description="When inserting a marker to indicate the end of a track, the marker's
name. E.g., 'track_name (End)'.
@@ -1030,7 +1018,33 @@ limitations under the License.
translation_description="The message when the marker list is empty.">
You don\'t have any markers.
</string>
<string name="marker_statistics"
translation_description="The label to add a statistics marker.">
Statistics
</string>
<string name="marker_statistics_name_format"
translation_description="When adding a statistics marker, the string format for the default
name.
%1$d: number. E.g., '1'.">
Statistics %1$d
</string>
<string name="marker_type"
translation_description="When adding a marker, the label to select a type, statistics or
waypoint.">
Type
</string>
<string name="marker_waypoint"
translation_description="The label to add a waypoint marker.">
Waypoint
</string>
<string name="marker_waypoint_name_format"
translation_description="When adding a waypoint marker, the string format for the default name.
%1$d: number. E.g., '1'.">
Waypoint %1$d
</string>
<!-- Menu Items -->
<string name="menu_aggregated_statistics"
translation_description="In the menu, to go to the aggregated statistics page.">
+6
View File
@@ -45,6 +45,12 @@ limitations under the License.
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">false</item>
</style>
<!-- The style for the edit label -->
<style name="EditLabel" parent="@style/TextMedium" />
<!-- The style for the edit lable with padding top -->
<style name="EditLabel.WithPaddingTop">
<item name="android:paddingTop">16dp</item>
</style>
<!-- The style for the edit name -->
<style name="EditName" parent="@style/TextMedium.WithIcon">
<item name="android:inputType">textAutoCorrect|textCapWords</item>