Clean up all the layouts.

Utilize styles when possible.
This commit is contained in:
Jimmy Shih
2012-04-20 17:46:48 -07:00
parent eb3e7e0b86
commit 7701d31bdc
28 changed files with 340 additions and 582 deletions
-19
View File
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2010 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient android:startColor="#ff999999" android:endColor="#ff777777" android:angle="270"/>
</shape>
+14 -43
View File
@@ -15,64 +15,35 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
style="@style/ScrollView" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="8dp" >
<TextView
android:drawableLeft="@drawable/arrow_icon"
android:drawablePadding="8dp"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/about_copyright_notice" />
android:text="@string/about_copyright_notice"
style="@style/TextMedium.WithIcon" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Large"
android:text="@string/about_version" />
android:text="@string/about_version"
style="@style/TextLarge" />
<TextView
android:id="@+id/about_version"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="48dp"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/AboutValue" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Large"
android:text="@string/about_support" />
android:text="@string/about_support"
style="@style/TextLarge" />
<TextView
android:autoLink="web"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="48dp"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/my_tracks_support_url" />
android:text="@string/my_tracks_support_url"
style="@style/AboutValue" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Large"
android:text="@string/about_privacy" />
android:text="@string/about_privacy"
style="@style/TextLarge" />
<TextView
android:autoLink="web"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="48dp"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/my_tracks_privacy_url" />
android:text="@string/my_tracks_privacy_url"
style="@style/AboutValue" />
</LinearLayout>
</ScrollView>
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2010 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="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/chart_view_layout"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="fill_parent"
android:orientation="vertical" >
</LinearLayout>
<ZoomControls
android:background="@android:color/white"
android:gravity="right"
android:id="@+id/chart_zoom_controls"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:paddingRight="8dp" />
</LinearLayout>
+19 -54
View File
@@ -15,87 +15,52 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
style="@style/ScrollView" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical"
android:padding="8dp" >
<TextView
android:drawableLeft="@drawable/x_axis"
android:drawablePadding="8dp"
android:gravity="bottom"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Large"
android:text="@string/chart_settings_x_axis" />
android:text="@string/chart_settings_x_axis"
style="@style/TextLarge.WithIcon" />
<RadioGroup
android:id="@+id/chart_settings_x"
android:layout_height="wrap_content"
android:layout_width="wrap_content" >
<RadioButton
android:id="@+id/chart_settings_by_distance"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/chart_settings_by_distance" />
android:text="@string/chart_settings_by_distance"
style="@style/TextMedium" />
<RadioButton
android:id="@+id/chart_settings_by_time"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/chart_settings_by_time" />
android:text="@string/chart_settings_by_time"
style="@style/TextMedium" />
</RadioGroup>
<TextView
android:drawableLeft="@drawable/y_axis"
android:drawablePadding="8dp"
android:gravity="bottom"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Large"
android:text="@string/chart_settings_y_axis" />
android:text="@string/chart_settings_y_axis"
style="@style/TextLarge.WithIcon" />
<CheckBox
android:id="@+id/chart_settings_elevation"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/stat_elevation" />
android:text="@string/stats_elevation"
style="@style/TextMedium" />
<CheckBox
android:id="@+id/chart_settings_speed"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/stat_speed" />
android:text="@string/stats_speed"
style="@style/TextMedium" />
<CheckBox
android:id="@+id/chart_settings_power"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/sensor_state_power" />
android:text="@string/sensor_state_power"
style="@style/TextMedium" />
<CheckBox
android:id="@+id/chart_settings_cadence"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/sensor_state_cadence" />
android:text="@string/sensor_state_cadence"
style="@style/TextMedium" />
<CheckBox
android:id="@+id/chart_settings_heart_rate"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
style="@android:style/TextAppearance.DeviceDefault.Medium"
android:text="@string/sensor_state_heart_rate" />
android:text="@string/sensor_state_heart_rate"
style="@style/TextMedium" />
</LinearLayout>
</ScrollView>
+6 -23
View File
@@ -14,32 +14,15 @@ 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"
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical">
<TextView
android:background="@drawable/list_bar"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:padding="5dp"
android:text="@string/maps_list_pick_map"
android:textColor="@color/white"
android:textSize="16sp"/>
android:layout_width="fill_parent" >
<ListView
android:id="@+id/choose_map_list_view"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_width="fill_parent"
android:padding="5dp"/>
android:layout_width="fill_parent" />
<TextView
android:id="@+id/choose_map_empty_view"
android:gravity="center"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_width="fill_parent"
android:padding="5dp"
android:textColor="@color/red"
android:textSize="16sp"
android:textStyle="bold"/>
</LinearLayout>
style="@style/ListEmptyTextView" >
</TextView>
</merge>
+14 -24
View File
@@ -15,33 +15,23 @@ 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:gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="vertical"
android:paddingBottom="2dp"
android:paddingTop="2dp">
android:padding="8dp" >
<TextView
android:id="@+id/choose_map_list_item_title"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_marginTop="6dp"
android:layout_width="fill_parent"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"
android:singleLine="true"/>
android:id="@+id/choose_map_item_title"
android:singleLine="true"
style="@style/TextLarge" />
<TextView
android:id="@+id/choose_map_list_item_description"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_width="fill_parent"
android:textSize="14sp"
android:singleLine="true"/>
android:id="@+id/choose_map_item_description"
android:singleLine="false"
android:textColor="@android:color/secondary_text_dark"
style="@style/TextSmall" />
<TextView
android:id="@+id/choose_map_list_item_search_status"
android:layout_height="wrap_content"
android:layout_marginLeft="6dp"
android:layout_width="fill_parent"
android:textSize="14sp"
android:singleLine="true"/>
</LinearLayout>
android:id="@+id/choose_map_item_search_status"
android:singleLine="true"
style="@style/TextSmall" />
</LinearLayout>
+2 -5
View File
@@ -18,11 +18,8 @@ limitations under the License.
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="fill_parent" >
<include layout="@layout/welcome" />
<ScrollView style="@style/ScrollView.WithBottomButtons" >
<include layout="@layout/help_content" />
</ScrollView>
<LinearLayout style="@style/BottomButtonBar" >
<include layout="@layout/help_buttons" />
+8 -3
View File
@@ -27,10 +27,13 @@ limitations under the License.
android:orientation="horizontal" >
<TextView
android:id="@+id/list_item_name"
style="@style/ListItemName" />
android:singleLine="true"
style="@style/TextLarge.WithIcon" />
<TextView
android:id="@+id/list_item_category"
style="@style/ListItemCategory" />
android:layout_marginLeft="8dp"
android:singleLine="true"
style="@style/TextSmall" />
</LinearLayout>
<LinearLayout
android:layout_height="wrap_content"
@@ -50,5 +53,7 @@ limitations under the License.
</LinearLayout>
<TextView
android:id="@+id/list_item_description"
style="@style/ListItemDescription" />
android:singleLine="false"
android:textColor="@android:color/secondary_text_dark"
style="@style/TextSmall" />
</LinearLayout>
+37
View File
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2010 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.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<!-- apiKey corresponds to certificate md5: 81:DF:A2:63:53:C7:6B:1E:6C:24:62:D4:91:1C:36:3A -->
<com.google.android.maps.MapView
android:apiKey="0TXoRmxTinrZKQ9JSazj-9A34XX6_lXsRvTpXWA"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:id="@+id/map_view"
android:layout_height="fill_parent"
android:layout_width="fill_parent" />
<TextView
android:background="@android:color/darker_gray"
android:id="@+id/map_message"
android:layout_alignParentTop="true"
android:layout_width="fill_parent"
android:padding="8dp"
android:visibility="gone"
style="@style/TextMedium" />
</RelativeLayout>
+5 -5
View File
@@ -15,7 +15,7 @@ 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">
style="@style/ScrollView" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
@@ -23,7 +23,7 @@ limitations under the License.
android:padding="8dp" >
<TextView
android:id="@+id/marker_detail_name"
style="@style/MarkerDetailLabel" />
style="@style/TextLarge" />
<LinearLayout
android:id="@+id/marker_detail_waypoint_section"
android:layout_height="wrap_content"
@@ -31,10 +31,10 @@ limitations under the License.
android:orientation="vertical" >
<TextView
android:id="@+id/marker_detail_marker_type"
style="@style/MarkerDetailLabel" />
style="@style/TextLarge" />
<TextView
android:id="@+id/marker_detail_description"
style="@style/MarkerDetailLabel" />
style="@style/TextLarge" />
</LinearLayout>
<TableLayout
android:id="@+id/marker_detail_statistics_section"
@@ -42,7 +42,7 @@ limitations under the License.
android:layout_width="fill_parent"
android:shrinkColumns="0,2"
android:stretchColumns="0,2" >
<include layout="@layout/stats_core" />
<include layout="@layout/stats_core" />
</TableLayout>
</LinearLayout>
</ScrollView>
+7 -10
View File
@@ -18,10 +18,7 @@ limitations under the License.
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="fill_parent" >
<ScrollView style="@style/ScrollView.WithBottomButtons" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
@@ -34,7 +31,7 @@ limitations under the License.
android:orientation="vertical" >
<TextView
android:text="@string/marker_edit_type"
style="@style/EditLabel" />
style="@style/TextMedium" />
<RadioGroup
android:id="@+id/marker_edit_type"
android:layout_height="wrap_content"
@@ -42,16 +39,16 @@ limitations under the License.
<RadioButton
android:id="@+id/marker_edit_type_statistics"
android:text="@string/marker_edit_type_statistics"
style="@style/EditLabel" />
style="@style/TextMedium" />
<RadioButton
android:id="@+id/marker_edit_type_waypoint"
android:text="@string/marker_edit_type_waypoint"
style="@style/EditLabel" />
style="@style/TextMedium" />
</RadioGroup>
</LinearLayout>
<TextView
android:text="@string/generic_name"
style="@style/EditLabel" />
style="@style/TextMedium" />
<EditText
android:hint="@string/generic_name"
android:id="@+id/marker_edit_name"
@@ -63,7 +60,7 @@ limitations under the License.
android:orientation="vertical" >
<TextView
android:text="@string/marker_edit_marker_type"
style="@style/EditLabel" />
style="@style/TextMedium" />
<AutoCompleteTextView
android:hint="@string/marker_edit_marker_type_hint"
android:id="@+id/marker_edit_marker_type"
@@ -71,7 +68,7 @@ limitations under the License.
style="@style/EditCategory" />
<TextView
android:text="@string/generic_description"
style="@style/EditLabel" />
style="@style/TextMedium" />
<EditText
android:hint="@string/generic_description"
android:id="@+id/marker_edit_description"
+2 -2
View File
@@ -14,7 +14,7 @@ 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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<ListView
@@ -26,4 +26,4 @@ limitations under the License.
android:text="@string/marker_list_empty_message"
style="@style/ListEmptyTextView" >
</TextView>
</FrameLayout>
</merge>
-57
View File
@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2010 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.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/elevation_root"
android:orientation="vertical"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
<LinearLayout android:id="@+id/elevation_chart"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</LinearLayout>
<RelativeLayout android:id="@+id/elevation_zoom_layout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp">
<ZoomControls android:id="@+id/elevation_zoom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<LinearLayout android:id="@+id/elevation_busypane"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="3dp"
android:visibility="gone">
<ProgressBar
android:layout_weight="1"
android:layout_height="0dp"
android:layout_width="wrap_content"
android:maxWidth="80dp"
android:maxHeight="80dp"
android:minWidth="80dp"
android:minHeight="80dp"
android:layout_gravity="center"/>
</LinearLayout>
</RelativeLayout>
-62
View File
@@ -1,62 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2010 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.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/screen"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:enabled="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:apiKey="0TXoRmxTinrZKQ9JSazj-9A34XX6_lXsRvTpXWA"/>
<!-- corresponding certificate md5: 81:DF:A2:63:53:C7:6B:1E:6C:24:62:D4:91:1C:36:3A -->
<LinearLayout android:id="@+id/messagepane"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/list_bar"
android:padding="3dp"
android:visibility="gone">
<TextView android:id="@+id/messagetext"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="16dp"
android:textColor="#fff"
android:text="@string/gps_wait_for_fix"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout android:id="@+id/busypane"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="3dp"
android:visibility="gone">
<ProgressBar
android:layout_weight="1"
android:layout_height="0dp"
android:layout_width="wrap_content"
android:maxWidth="80dp"
android:maxHeight="80dp"
android:minWidth="80dp"
android:minHeight="80dp"
android:layout_gravity="center"/>
</LinearLayout>
</RelativeLayout>
+2 -2
View File
@@ -14,7 +14,7 @@ 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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<ListView
@@ -26,4 +26,4 @@ limitations under the License.
android:text="@string/search_list_empty_message"
style="@style/ListEmptyTextView" >
</TextView>
</FrameLayout>
</merge>
+6 -6
View File
@@ -23,42 +23,42 @@ limitations under the License.
android:padding="8dp" >
<TextView
android:text="@string/menu_sensor_state"
style="@style/SensorStateLabel" />
style="@style/TextMedium" />
<TextView
android:id="@+id/sensor_state"
style="@style/SensorStateValue" />
<!-- Last sensor time -->
<TextView
android:text="@string/sensor_state_last_sensor_time"
style="@style/SensorStateLabel" />
style="@style/TextMedium" />
<TextView
android:id="@+id/sensor_state_last_sensor_time"
style="@style/SensorStateValue" />
<!-- Power -->
<TextView
android:text="@string/sensor_state_power"
style="@style/SensorStateLabel" />
style="@style/TextMedium" />
<TextView
android:id="@+id/sensor_state_power"
style="@style/SensorStateValue" />
<!-- Cadence -->
<TextView
android:text="@string/sensor_state_cadence"
style="@style/SensorStateLabel" />
style="@style/TextMedium" />
<TextView
android:id="@+id/sensor_state_cadence"
style="@style/SensorStateValue" />
<!-- Heart rate -->
<TextView
android:text="@string/sensor_state_heart_rate"
style="@style/SensorStateLabel" />
style="@style/TextMedium" />
<TextView
android:id="@+id/sensor_state_heart_rate"
style="@style/SensorStateValue" />
<!-- Battery level -->
<TextView
android:text="@string/sensor_state_battery"
style="@style/SensorStateLabel" />
style="@style/TextMedium" />
<TextView
android:id="@+id/sensor_state_battery"
style="@style/SensorStateValue" />
+4 -7
View File
@@ -18,10 +18,7 @@ limitations under the License.
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical" >
<ScrollView
android:layout_height="0dp"
android:layout_weight="1"
android:layout_width="fill_parent" >
<ScrollView style="@style/ScrollView.WithBottomButtons" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
@@ -29,7 +26,7 @@ limitations under the License.
android:padding="8dp" >
<TextView
android:text="@string/generic_name"
style="@style/EditLabel" />
style="@style/TextMedium" />
<EditText
android:drawableLeft="@drawable/track"
android:hint="@string/generic_name"
@@ -38,7 +35,7 @@ limitations under the License.
style="@style/EditName" />
<TextView
android:text="@string/track_edit_activity_type"
style="@style/EditLabel" />
style="@style/TextMedium" />
<AutoCompleteTextView
android:hint="@string/track_edit_activity_type_hint"
android:id="@+id/track_edit_activity_type"
@@ -46,7 +43,7 @@ limitations under the License.
style="@style/EditCategory" />
<TextView
android:text="@string/generic_description"
style="@style/EditLabel" />
style="@style/TextMedium" />
<EditText
android:hint="@string/generic_description"
android:id="@+id/track_edit_description"
+3 -3
View File
@@ -14,7 +14,7 @@ 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.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<ListView
@@ -26,7 +26,7 @@ limitations under the License.
android:id="@+id/track_list_empty"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical">
android:orientation="vertical" >
<TextView
android:text="@string/track_list_empty_message"
style="@style/ListEmptyTextView" >
@@ -40,4 +40,4 @@ limitations under the License.
android:src="@drawable/menu_record_track"
style="@android:style/Widget.DeviceDefault.ImageButton" />
</LinearLayout>
</FrameLayout>
</merge>
+60 -66
View File
@@ -14,77 +14,71 @@ 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_width="fill_parent"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/appwidget_background"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:paddingBottom="5dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<LinearLayout
android:paddingTop="5dp" >
<ImageButton
android:background="@android:color/transparent"
android:contentDescription="@string/my_tracks_app_name"
android:id="@+id/appwidget_button"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:background="@drawable/appwidget_background">
<ImageButton
android:id="@+id/appwidget_button"
android:layout_height="fill_parent"
android:layout_width="wrap_content"
android:background="@android:color/transparent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:src="@drawable/appwidget_button_disabled" />
android:layout_width="wrap_content"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:src="@drawable/appwidget_button_disabled" />
<LinearLayout
android:clickable="true"
android:id="@+id/appwidget_track_statistics"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_width="0dp"
android:orientation="vertical"
android:paddingLeft="16dp" >
<LinearLayout
android:id="@+id/appwidget_track_statistics"
android:layout_height="fill_parent"
android:layout_width="0dp"
android:layout_weight="1"
android:clickable="true"
android:orientation="vertical"
android:paddingLeft="15dp">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal">
<TextView
style="@style/WidgetTextView.Value"
android:id="@+id/appwidget_distance_text" />
<TextView
style="@style/WidgetTextView"
android:text="@string/stats_total_distance" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@color/appwidget_hr" />
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:paddingBottom="2dp">
<TextView
style="@style/WidgetTextView.Value"
android:id="@+id/appwidget_time_text" />
<TextView
style="@style/WidgetTextView"
android:text="@string/stats_moving_time" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@color/appwidget_hr" />
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal">
<TextView
style="@style/WidgetTextView.Value"
android:id="@+id/appwidget_speed_text" />
<TextView
style="@style/WidgetTextView"
android:text="@string/stats_speed" />
</LinearLayout>
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/appwidget_distance_text"
style="@style/TrackWidgetValue" />
<TextView
android:text="@string/stats_total_distance"
style="@style/TextSmall" />
</LinearLayout>
<LinearLayout
android:background="@color/appwidget_hr"
android:layout_height="1dp"
android:layout_width="fill_parent" />
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/appwidget_time_text"
style="@style/TrackWidgetValue" />
<TextView
android:text="@string/stats_moving_time"
style="@style/TextSmall" />
</LinearLayout>
<LinearLayout
android:background="@color/appwidget_hr"
android:layout_height="1dp"
android:layout_width="fill_parent" />
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/appwidget_speed_text"
style="@style/TrackWidgetValue" />
<TextView
android:text="@string/stats_speed"
style="@style/TextSmall" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
+14 -28
View File
@@ -15,13 +15,12 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_margin="8dp"
android:layout_width="fill_parent" >
style="@style/ScrollView" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="vertical" >
android:orientation="vertical"
android:padding="8dp" >
<!-- Google Maps result -->
<LinearLayout
android:id="@+id/upload_result_maps_result"
@@ -36,20 +35,17 @@ limitations under the License.
android:layout_width="wrap_content"
android:src="@drawable/success" />
<LinearLayout
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical"
android:paddingLeft="8dp" >
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_maps"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/TextMedium" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_maps_url"
style="@android:style/TextAppearance.DeviceDefault.Small" />
style="@style/TextSmall" />
</LinearLayout>
</LinearLayout>
<!-- Google Fusion Tables result -->
@@ -66,20 +62,17 @@ limitations under the License.
android:layout_width="wrap_content"
android:src="@drawable/success" />
<LinearLayout
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical"
android:paddingLeft="8dp" >
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_fusion_tables"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/TextMedium" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_fusion_tables_url"
style="@android:style/TextAppearance.DeviceDefault.Small" />
style="@style/TextSmall" />
</LinearLayout>
</LinearLayout>
<!-- Google Docs result -->
@@ -96,36 +89,29 @@ limitations under the License.
android:layout_width="wrap_content"
android:src="@drawable/success" />
<LinearLayout
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical"
android:paddingLeft="8dp" >
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_docs"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/TextMedium" />
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_docs_url"
style="@android:style/TextAppearance.DeviceDefault.Small" />
style="@style/TextSmall" />
</LinearLayout>
</LinearLayout>
<!-- Footer -->
<TextView
android:id="@+id/upload_result_success_footer"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:padding="8dp"
android:text="@string/send_google_success_footer"
style="@android:style/TextAppearance.DeviceDefault.Small" />
style="@style/TextSmall" />
<TextView
android:id="@+id/upload_result_error_footer"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:padding="8dp"
android:text="@string/send_google_error"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/TextMedium" />
</LinearLayout>
</ScrollView>
+13 -33
View File
@@ -15,27 +15,21 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
style="@style/ScrollView" >
<TableLayout
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_width="fill_parent"
android:padding="8dp"
android:stretchColumns="1" >
<TableRow android:id="@+id/send_google_maps_row" >
<ImageView
android:contentDescription="@string/send_google_maps"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/maps_icon" />
android:src="@drawable/maps_icon"
style="@style/UploadServiceChooserImageView" />
<CheckBox
android:id="@+id/send_google_maps"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_width="0dp"
android:text="@string/send_google_maps"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/UploadServiceChooserCheckBox" />
</TableRow>
<TableRow android:id="@+id/send_google_maps_option_row" >
<RadioGroup
@@ -45,47 +39,33 @@ limitations under the License.
android:layout_width="0dp" >
<RadioButton
android:id="@+id/send_google_new_map"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_new_map"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/TextMedium" />
<RadioButton
android:id="@+id/send_google_existing_map"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/send_google_existing_map"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/TextMedium" />
</RadioGroup>
</TableRow>
<TableRow android:id="@+id/send_google_fusion_tables_row" >
<ImageView
android:contentDescription="@string/send_google_fusion_tables"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/googledocs_icon" />
android:src="@drawable/googledocs_icon"
style="@style/UploadServiceChooserImageView" />
<CheckBox
android:id="@+id/send_google_fusion_tables"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_width="0dp"
android:text="@string/send_google_fusion_tables"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/UploadServiceChooserCheckBox" />
</TableRow>
<TableRow android:id="@+id/send_google_docs_row" >
<ImageView
android:contentDescription="@string/send_google_docs"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/googledocs_icon" />
android:src="@drawable/googledocs_icon"
style="@style/UploadServiceChooserImageView" />
<CheckBox
android:id="@+id/send_google_docs"
android:layout_gravity="center_vertical"
android:layout_height="fill_parent"
android:layout_marginLeft="8dp"
android:layout_width="0dp"
android:text="@string/send_google_docs"
style="@android:style/TextAppearance.DeviceDefault.Medium" />
style="@style/UploadServiceChooserCheckBox" />
</TableRow>
</TableLayout>
</ScrollView>
+2 -3
View File
@@ -15,7 +15,6 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent" >
<include layout="@layout/help_content"/>
style="@style/ScrollView" >
<include layout="@layout/help_content" />
</ScrollView>
+2 -7
View File
@@ -929,11 +929,6 @@ limitations under the License.
'Maps' list page informing the user that he doesn't have any maps.">
You don\'t have any maps.
</string>
<string name="maps_list_pick_map"
translation_description="When sending a track to an existing Google Map, the text on the
'Maps' list page asking the user to pick one of his maps.">
Pick a map:
</string>
<string name="maps_list_progress_message"
translation_description="When sending a track to an existing Google Map, the progress message
informing the user that his maps are being loaded.">
@@ -946,8 +941,8 @@ limitations under the License.
</string>
<string name="maps_list_title"
translation_description="When sending a track to an existing Google Map, the title of the
page listing the user's maps in Google Maps.">
Your Google Maps
page asking the user to pick a map.">
Pick a Map
</string>
<string name="maps_list_unlisted_label"
translation_description="When sending a track to an existing Google Map, in the 'Maps'
+66 -80
View File
@@ -15,6 +15,10 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- The style for the about value -->
<style name="AboutValue" parent="@style/TextMedium">
<item name="android:paddingLeft">48dp</item>
</style>
<!-- The style for the bottom button -->
<style name="BottomButton" parent="@android:style/Widget.DeviceDefault.Button.Borderless">
<item name="android:layout_height">wrap_content</item>
@@ -28,100 +32,57 @@ limitations under the License.
<item name="android:orientation">horizontal</item>
</style>
<!-- The style for the edit category -->
<style name="EditCategory" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:layout_height">wrap_content</item>
<style name="EditCategory" parent="@style/TextMedium">
<item name="android:layout_width">fill_parent</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">true</item>
</style>
<!-- The style for the edit description -->
<style name="EditDescription" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<style name="EditDescription" parent="@style/TextMedium">
<item name="android:inputType">textAutoCorrect|textCapSentences</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:maxLines">50</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">false</item>
</style>
<!-- The style for the edit label -->
<style name="EditLabel" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- The style for the edit name -->
<style name="EditName" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:drawablePadding">8dp</item>
<item name="android:gravity">center_vertical</item>
<style name="EditName" parent="@style/TextMedium.WithIcon">
<item name="android:inputType">textAutoCorrect|textCapWords</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:selectAllOnFocus">true</item>
<item name="android:singleLine">true</item>
</style>
<!-- The style for the list empty text view -->
<style name="ListEmptyTextView" parent="@android:style/TextAppearance.DeviceDefault.Large">
<style name="ListEmptyTextView" parent="@style/TextLarge">
<item name="android:gravity">center</item>
<item name="android:layout_gravity">center</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:padding">8dp</item>
</style>
<!-- The style for the list item category -->
<style name="ListItemCategory" parent="@android:style/TextAppearance.DeviceDefault.Small">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:singleLine">true</item>
</style>
<!-- The style for the list item description -->
<style name="ListItemDescription" parent="@android:style/TextAppearance.DeviceDefault.Small">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:singleLine">false</item>
<item name="android:textColor">@android:color/secondary_text_dark</item>
</style>
<!-- The style for the list item name -->
<style name="ListItemName" parent="@android:style/TextAppearance.DeviceDefault.Large">
<item name="android:gravity">center_vertical</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:drawablePadding">8dp</item>
<item name="android:singleLine">true</item>
</style>
<!-- style for the list item stats -->
<style name="ListItemStats" parent="@android:style/TextAppearance.DeviceDefault.Small">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<style name="ListItemStats" parent="@style/TextSmall">
<item name="android:singleLine">true</item>
<item name="android:textColor">@android:color/secondary_text_dark</item>
</style>
<!-- The style for the marker detail label -->
<style name="MarkerDetailLabel" parent="@android:style/TextAppearance.DeviceDefault.Large">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- The style for the sensor state label -->
<style name="SensorStateLabel" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- The style for the sensor state value -->
<style name="SensorStateValue" parent="@android:style/TextAppearance.DeviceDefault.Large">
<item name="android:background">@android:color/background_light</item>
<item name="android:gravity">right</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<!-- The style for the scroll view -->
<style name="ScrollView">
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:scrollbarStyle">outsideInset</item>
</style>
<!-- The style for the scroll view with bottom buttons -->
<style name="ScrollView.WithBottomButtons">
<item name="android:layout_height">0dp</item>
<item name="android:layout_weight">1</item>
</style>
<!-- The style for the sensor state value -->
<style name="SensorStateValue" parent="@style/TextLarge">
<item name="android:background">@android:color/background_light</item>
<item name="android:gravity">right</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<!-- The style for the stats label -->
<style name="StatsLabel" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:layout_height">wrap_content</item>
<style name="StatsLabel" parent="@style/TextMedium">
<item name="android:layout_weight">1</item>
<item name="android:layout_width">0dp</item>
</style>
@@ -131,37 +92,62 @@ limitations under the License.
<item name="android:layout_width">8dp</item>
</style>
<!-- The style for the stats value -->
<style name="StatsValue" parent="@android:style/TextAppearance.DeviceDefault.Large">
<style name="StatsValue" parent="@style/TextLarge">
<item name="android:background">@android:color/background_light</item>
<item name="android:gravity">right</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_width">0dp</item>
<item name="android:textColor">@android:color/primary_text_light</item>
</style>
<style name="ThemeSelector" parent="android:Theme" />
<!-- The style for the welcome page answer -->
<style name="WelcomeAnswerTextView" parent="@android:style/TextAppearance.DeviceDefault.Small">
<!-- The style for large size text -->
<style name="TextLarge" parent="@android:style/TextAppearance.DeviceDefault.Large">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- The style for large size text with an icon on the left -->
<style name="TextLarge.WithIcon">
<item name="android:drawablePadding">8dp</item>
<item name="android:gravity">center_vertical</item>
</style>
<!-- The style for medium size text -->
<style name="TextMedium" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- The style for medium size text with an icon on the left -->
<style name="TextMedium.WithIcon">
<item name="android:drawablePadding">8dp</item>
<item name="android:gravity">center_vertical</item>
</style>
<!-- The style for large size text -->
<style name="TextSmall" parent="@android:style/TextAppearance.DeviceDefault.Small">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- Theme selector -->
<style name="ThemeSelector" parent="android:Theme" />
<!-- The style for the track widget value -->
<style name="TrackWidgetValue" parent="@style/TextSmall">
<item name="android:width">100dp</item>
</style>
<!-- The style for upload service chooser check box -->
<style name="UploadServiceChooserCheckBox" parent="@style/TextMedium">
<item name="android:layout_gravity">center_vertical</item>
<item name="android:layout_marginLeft">8dp</item>
<item name="android:layout_width">0dp</item>
</style>
<!-- The style for upload service chooser image view -->
<style name="UploadServiceChooserImageView">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
<!-- The style for the welcome page answer -->
<style name="WelcomeAnswerTextView" parent="@style/TextSmall">
<item name="android:paddingBottom">8dp</item>
</style>
<!-- The style for welcome page question -->
<style name="WelcomeQuestionTextView" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<style name="WelcomeQuestionTextView" parent="@style/TextMedium">
<item name="android:paddingTop">8dp</item>
<item name="android:textStyle">bold</item>
</style>
<!-- The style for the widget label -->
<style name="WidgetTextView">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:textColor">@color/appwidget_text</item>
<item name="android:textSize">14sp</item>
</style>
<!-- The style for the widget value -->
<style name="WidgetTextView.Value">
<item name="android:width">160px</item>
</style>
</resources>
@@ -144,7 +144,7 @@ public class TrackDetailActivity extends FragmentActivity {
trackDataHub = ((MyTracksApplication) getApplication()).getTrackDataHub();
trackRecordingServiceConnection = new TrackRecordingServiceConnection(this, null);
mapViewContainer = getLayoutInflater().inflate(R.layout.mytracks_layout, null);
mapViewContainer = getLayoutInflater().inflate(R.layout.map, null);
tabHost = (TabHost) findViewById(android.R.id.tabhost);
tabHost.setup();
tabManager = new TabManager(this, tabHost, R.id.realtabcontent);
@@ -42,7 +42,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import android.widget.ZoomControls;
import java.util.ArrayList;
@@ -77,7 +76,6 @@ public class ChartFragment extends Fragment implements TrackDataListener {
// UI elements
private ChartView chartView;
private LinearLayout busyPane;
private ZoomControls zoomControls;
/**
@@ -91,7 +89,6 @@ public class ChartFragment extends Fragment implements TrackDataListener {
return;
}
busyPane.setVisibility(View.GONE);
zoomControls.setIsZoomInEnabled(chartView.canZoomIn());
zoomControls.setIsZoomOutEnabled(chartView.canZoomOut());
chartView.setShowPointer(isRecording());
@@ -113,9 +110,8 @@ public class ChartFragment extends Fragment implements TrackDataListener {
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.mytracks_charts, container, false);
busyPane = (LinearLayout) view.findViewById(R.id.elevation_busypane);
zoomControls = (ZoomControls) view.findViewById(R.id.elevation_zoom);
View view = inflater.inflate(R.layout.chart, container, false);
zoomControls = (ZoomControls) view.findViewById(R.id.chart_zoom_controls);
zoomControls.setOnZoomInClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@@ -134,7 +130,7 @@ public class ChartFragment extends Fragment implements TrackDataListener {
@Override
public void onStart() {
super.onStart();
ViewGroup layout = (ViewGroup) getActivity().findViewById(R.id.elevation_chart);
ViewGroup layout = (ViewGroup) getActivity().findViewById(R.id.chart_view_layout);
LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT);
layout.addView(chartView, layoutParams);
@@ -156,7 +152,7 @@ public class ChartFragment extends Fragment implements TrackDataListener {
@Override
public void onStop() {
super.onStop();
ViewGroup layout = (ViewGroup) getActivity().findViewById(R.id.elevation_chart);
ViewGroup layout = (ViewGroup) getActivity().findViewById(R.id.chart_view_layout);
layout.removeView(chartView);
}
@@ -229,12 +225,7 @@ public class ChartFragment extends Fragment implements TrackDataListener {
@Override
public void onSelectedTrackChanged(Track track, boolean isRecording) {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
busyPane.setVisibility(View.VISIBLE);
}
});
// We don't care.
}
@Override
@@ -43,8 +43,6 @@ import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
@@ -85,11 +83,8 @@ public class MapFragment extends Fragment
// UI elements
private View mapViewContainer;
private MapOverlay mapOverlay;
private RelativeLayout screen;
private MapView mapView;
private LinearLayout messagePane;
private TextView messageText;
private LinearLayout busyPane;
private TextView messageTextView;
@Override
public View onCreateView(
@@ -98,15 +93,12 @@ public class MapFragment extends Fragment
mapOverlay = new MapOverlay(getActivity());
screen = (RelativeLayout) mapViewContainer.findViewById(R.id.screen);
mapView = (MapView) mapViewContainer.findViewById(R.id.map);
mapView = (MapView) mapViewContainer.findViewById(R.id.map_view);
mapView.requestFocus();
mapView.setOnTouchListener(this);
mapView.setBuiltInZoomControls(true);
mapView.getOverlays().add(mapOverlay);
messagePane = (LinearLayout) mapViewContainer.findViewById(R.id.messagepane);
messageText = (TextView) mapViewContainer.findViewById(R.id.messagetext);
busyPane = (LinearLayout) mapViewContainer.findViewById(R.id.busypane);
messageTextView = (TextView) mapViewContainer.findViewById(R.id.map_message);
return mapViewContainer;
}
@@ -238,7 +230,7 @@ public class MapFragment extends Fragment
@Override
public void onClick(View v) {
if (v == messagePane) {
if (v == messageTextView) {
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(intent);
}
@@ -270,21 +262,20 @@ public class MapFragment extends Fragment
@Override
public void run() {
if (messageId != -1) {
messageText.setText(messageId);
messagePane.setVisibility(View.VISIBLE);
messageTextView.setText(messageId);
messageTextView.setVisibility(View.VISIBLE);
if (isGpsDisabled) {
Toast.makeText(getActivity(), R.string.gps_not_found, Toast.LENGTH_LONG).show();
// Click to show the location source settings
messagePane.setOnClickListener(MapFragment.this);
messageTextView.setOnClickListener(MapFragment.this);
} else {
messagePane.setOnClickListener(null);
messageTextView.setOnClickListener(null);
}
} else {
messagePane.setVisibility(View.GONE);
messageTextView.setVisibility(View.GONE);
}
screen.requestLayout();
}
});
}
@@ -310,9 +301,7 @@ public class MapFragment extends Fragment
boolean hasTrack = track != null;
mapOverlay.setTrackDrawingEnabled(hasTrack);
if (hasTrack) {
busyPane.setVisibility(View.VISIBLE);
if (hasTrack) {
synchronized (this) {
/*
* Synchronize to prevent race condition in changing markerTrackId
@@ -322,7 +311,6 @@ public class MapFragment extends Fragment
updateMap(track);
}
mapOverlay.setShowEndMarker(!isRecording);
busyPane.setVisibility(View.GONE);
}
mapView.invalidate();
}
@@ -68,11 +68,11 @@ public class ChooseMapActivity extends Activity {
}
MapsMapMetadata mapData = getItem(position).getMapData();
TextView title = (TextView) convertView.findViewById(R.id.choose_map_list_item_title);
TextView title = (TextView) convertView.findViewById(R.id.choose_map_item_title);
title.setText(mapData.getTitle());
TextView description = (TextView) convertView.findViewById(
R.id.choose_map_list_item_description);
R.id.choose_map_item_description);
String descriptionText = mapData.getDescription();
if (descriptionText == null || descriptionText.equals("")) {
description.setVisibility(View.GONE);
@@ -82,7 +82,7 @@ public class ChooseMapActivity extends Activity {
}
TextView searchStatus = (TextView) convertView.findViewById(
R.id.choose_map_list_item_search_status);
R.id.choose_map_item_search_status);
searchStatus.setTextColor(mapData.getSearchable() ? Color.RED : Color.GREEN);
searchStatus.setText(mapData.getSearchable() ? R.string.maps_list_public_label
: R.string.maps_list_unlisted_label);