forked from upstream-mirrors/OpenTracks
merge heads
This commit is contained in:
@@ -148,6 +148,9 @@ limitations under the License.
|
|||||||
android:label="@string/menu_aggregated_statistics"
|
android:label="@string/menu_aggregated_statistics"
|
||||||
android:name="com.google.android.apps.mytracks.AggregatedStatsActivity" />
|
android:name="com.google.android.apps.mytracks.AggregatedStatsActivity" />
|
||||||
<activity android:name="com.google.android.apps.mytracks.ExportActivity"/>
|
<activity android:name="com.google.android.apps.mytracks.ExportActivity"/>
|
||||||
|
<activity
|
||||||
|
android:label="@string/menu_help"
|
||||||
|
android:name="com.google.android.apps.mytracks.HelpActivity" />
|
||||||
<activity
|
<activity
|
||||||
android:label="@string/my_tracks_importer"
|
android:label="@string/my_tracks_importer"
|
||||||
android:name="com.google.android.apps.mytracks.ImportActivity"
|
android:name="com.google.android.apps.mytracks.ImportActivity"
|
||||||
@@ -229,10 +232,6 @@ limitations under the License.
|
|||||||
android:name="android.app.default_searchable"
|
android:name="android.app.default_searchable"
|
||||||
android:value="com.google.android.apps.mytracks.SearchActivity" />
|
android:value="com.google.android.apps.mytracks.SearchActivity" />
|
||||||
</activity>
|
</activity>
|
||||||
<activity
|
|
||||||
android:exported="false"
|
|
||||||
android:label="@string/welcome_title"
|
|
||||||
android:name="com.google.android.apps.mytracks.WelcomeActivity" />
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.io.backup.BackupActivity"/>
|
<activity android:name="com.google.android.apps.mytracks.io.backup.BackupActivity"/>
|
||||||
<activity android:name="com.google.android.apps.mytracks.io.backup.RestoreActivity"/>
|
<activity android:name="com.google.android.apps.mytracks.io.backup.RestoreActivity"/>
|
||||||
<activity android:name="com.google.android.apps.mytracks.io.backup.RestoreChooserActivity"/>
|
<activity android:name="com.google.android.apps.mytracks.io.backup.RestoreChooserActivity"/>
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<Button
|
||||||
|
android:id="@+id/help_about"
|
||||||
|
android:text="@string/help_about"
|
||||||
|
style="@style/BottomButton" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/help_ok"
|
||||||
|
android:text="@string/generic_ok"
|
||||||
|
style="@style/BottomButton" />
|
||||||
|
</merge>
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
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>
|
||||||
|
<LinearLayout style="@style/BottomBar" >
|
||||||
|
<include layout="@layout/help_buttons" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<Button
|
||||||
|
android:id="@+id/help_ok"
|
||||||
|
android:text="@string/generic_ok"
|
||||||
|
style="@style/BottomButton" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/help_about"
|
||||||
|
android:text="@string/help_about"
|
||||||
|
style="@style/BottomButton" />
|
||||||
|
</merge>
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="8dp" >
|
||||||
|
<ImageView
|
||||||
|
android:contentDescription="@string/my_tracks_app_name"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:scaleType="fitStart"
|
||||||
|
android:src="@drawable/arrow_icon" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_my_tracks_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_my_tracks_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_location_precision_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_location_precision_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_gps_fix_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_gps_fix_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_data_connection_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_data_connection_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_elevation_precision_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_elevation_precision_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_battery_life_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_battery_life_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_share_friends_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_share_friends_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_share_visibility_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_share_visibility_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_split_track_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_split_track_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_saved_files_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_saved_files_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_waypoint_marker_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_waypoint_marker_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_statistics_marker_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_statistics_marker_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_delete_tracks_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_delete_tracks_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_edit_tracks_question"
|
||||||
|
style="@style/WelcomeQuestionTextView" />
|
||||||
|
<TextView
|
||||||
|
android:text="@string/help_edit_tracks_answer"
|
||||||
|
style="@style/WelcomeAnswerTextView" />
|
||||||
|
</LinearLayout>
|
||||||
|
</merge>
|
||||||
@@ -486,16 +486,14 @@ limitations under the License.
|
|||||||
</TableLayout>
|
</TableLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<LinearLayout style="@style/ButtonLayout">
|
<LinearLayout style="@style/BottomBar" >
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
<Button
|
||||||
<Button android:id="@+id/waypointdetails_save"
|
android:id="@+id/waypointdetails_save"
|
||||||
android:layout_gravity="left"
|
|
||||||
android:text="@string/generic_save"
|
android:text="@string/generic_save"
|
||||||
style="@style/Button"/>
|
style="@style/BottomButton" />
|
||||||
<Button android:id="@+id/waypointdetails_cancel"
|
<Button
|
||||||
android:layout_gravity="right"
|
android:id="@+id/waypointdetails_cancel"
|
||||||
android:text="@string/generic_cancel"
|
android:text="@string/generic_cancel"
|
||||||
style="@style/Button"/>
|
style="@style/BottomButton" />
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -35,21 +35,18 @@ limitations under the License.
|
|||||||
android:text="@string/marker_list_pick_one"
|
android:text="@string/marker_list_pick_one"
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ListView android:id="@android:id/list"
|
<ListView android:id="@android:id/list"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
<LinearLayout style="@style/ButtonLayout">
|
<LinearLayout style="@style/BottomBar" >
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
<Button
|
||||||
<Button android:id="@+id/waypointslist_btn_insert_statistics"
|
android:id="@+id/waypointslist_btn_insert_statistics"
|
||||||
android:layout_gravity="left"
|
|
||||||
android:text="@string/marker_list_insert_statistics"
|
android:text="@string/marker_list_insert_statistics"
|
||||||
style="@style/Button"/>
|
style="@style/BottomButton" />
|
||||||
<Button android:id="@+id/waypointslist_btn_insert_waypoint"
|
<Button
|
||||||
android:layout_gravity="right"
|
android:id="@+id/waypointslist_btn_insert_waypoint"
|
||||||
android:text="@string/marker_list_insert_waypoint"
|
android:text="@string/marker_list_insert_waypoint"
|
||||||
style="@style/Button"/>
|
style="@style/BottomButton" />
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -92,20 +92,14 @@ limitations under the License.
|
|||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<LinearLayout style="@style/ButtonLayout">
|
<LinearLayout style="@style/BottomBar" >
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/track_edit_save"
|
android:id="@+id/track_edit_save"
|
||||||
android:layout_gravity="left"
|
|
||||||
android:text="@string/generic_save"
|
android:text="@string/generic_save"
|
||||||
style="@style/Button"
|
style="@style/BottomButton" />
|
||||||
/>
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/track_edit_cancel"
|
android:id="@+id/track_edit_cancel"
|
||||||
android:layout_gravity="right"
|
|
||||||
android:text="@string/generic_cancel"
|
android:text="@string/generic_cancel"
|
||||||
style="@style/Button"
|
style="@style/BottomButton" />
|
||||||
/>
|
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -14,142 +14,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<LinearLayout
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="fill_parent"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent" >
|
||||||
android:orientation="vertical">
|
<include layout="@layout/help_content"/>
|
||||||
<ScrollView
|
</ScrollView>
|
||||||
android:background="@color/white"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="fill_parent">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
<ImageView
|
|
||||||
android:contentDescription="@string/my_tracks_app_name"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:scaleType="fitStart"
|
|
||||||
android:src="@drawable/arrow_icon"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_my_tracks_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_my_tracks_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_app_navigation_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_app_navigation_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_add_graph_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_add_graph_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_gps_fix_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_gps_fix_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_send_google_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_send_google_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_share_friends_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_share_friends_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_waypoint_marker_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_waypoint_marker_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_statistics_marker_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_statistics_marker_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_data_connection_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_data_connection_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_battery_life_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_battery_life_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_share_file_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_share_file_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_location_precision_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_location_precision_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_elevation_precision_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_elevation_precision_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_edit_accuracy_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_edit_accuracy_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_split_track_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_split_track_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_delete_all_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_delete_all_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_maps_sharing_question"
|
|
||||||
style="@style/WelcomeTextView.Question"/>
|
|
||||||
<TextView
|
|
||||||
android:text="@string/welcome_maps_sharing_answer"
|
|
||||||
style="@style/WelcomeTextView"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</ScrollView>
|
|
||||||
<LinearLayout style="@style/ButtonLayout">
|
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
|
||||||
<Button
|
|
||||||
android:id="@+id/welcome_ok"
|
|
||||||
android:layout_gravity="left"
|
|
||||||
android:text="@string/generic_ok"
|
|
||||||
style="@style/Button"/>
|
|
||||||
<Button
|
|
||||||
android:id="@+id/welcome_about"
|
|
||||||
android:layout_gravity="right"
|
|
||||||
android:text="@string/welcome_about"
|
|
||||||
style="@style/Button"/>
|
|
||||||
<LinearLayout style="@style/ButtonSpacer"/>
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
+152
-199
@@ -700,6 +700,155 @@ limitations under the License.
|
|||||||
Waiting for a better GPS fix. Make sure the sky is visible.
|
Waiting for a better GPS fix. Make sure the sky is visible.
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
|
<!-- Help page -->
|
||||||
|
<string name="help_about"
|
||||||
|
translation_description="In the 'Help' page, the button on the bottom to open the 'About My
|
||||||
|
Tracks' dialog.">
|
||||||
|
About My Tracks
|
||||||
|
</string>
|
||||||
|
<string name="help_battery_life_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on battery life.">
|
||||||
|
The GPS receiver draws a relatively high amount of power, so a fully charged battery typically
|
||||||
|
survives less than 5 hours. Battery life depends on many factors, including signal strength,
|
||||||
|
battery freshness, and tasks running in parallel. Switching off some or all of the phone\'s
|
||||||
|
radios will lengthen battery life. Putting the phone into Airplane mode will yield the best
|
||||||
|
results.
|
||||||
|
</string>
|
||||||
|
<string name="help_battery_life_question"
|
||||||
|
translation_description="In the 'Help' page, the question on battery life.">
|
||||||
|
How long does the battery last when recording tracks?
|
||||||
|
</string>
|
||||||
|
<string name="help_data_connection_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on data connection.">
|
||||||
|
Cell signal or data connection is not required to record GPS tracks. However, if there is no
|
||||||
|
data connection, you will not be able to see a map. Instead, you will see a grey screen or a
|
||||||
|
partial map. Tracks, represented as simple lines, can still be recorded even if there is no data
|
||||||
|
connection.
|
||||||
|
</string>
|
||||||
|
<string name="help_data_connection_question"
|
||||||
|
translation_description="In the 'Help' page, the question on data connection.">
|
||||||
|
Do I need cell signal and data connection to use My Tracks?
|
||||||
|
</string>
|
||||||
|
<string name="help_delete_tracks_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on delete tracks.">
|
||||||
|
From the track list, select \"Delete all\" when not recording. This permanently deletes the
|
||||||
|
recorded tracks from memory. If you have saved tracks or backups on the SD card, you must delete
|
||||||
|
them separately. Tracks uploaded to Google Maps, Google Fusion Tables, and Google Doc must also
|
||||||
|
be deleted separately.
|
||||||
|
</string>
|
||||||
|
<string name="help_delete_tracks_question"
|
||||||
|
translation_description="In the 'Help' page, the question on delete tracks.">
|
||||||
|
How do I delete all the tracks from the phone?
|
||||||
|
</string>
|
||||||
|
<string name="help_edit_tracks_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on edit tracks.">
|
||||||
|
Currently, you can\'t with My Tracks. But you can upload your tracks to Google or save them to
|
||||||
|
the SD card to modify them there.
|
||||||
|
</string>
|
||||||
|
<string name="help_edit_tracks_question"
|
||||||
|
translation_description="In the 'Help' page, the question on edit tracks.">
|
||||||
|
How can I edit or correct tracks for accuracy?
|
||||||
|
</string>
|
||||||
|
<string name="help_elevation_precision_answer"
|
||||||
|
translation_description="In the 'Help' page, the help content answer on elevation
|
||||||
|
precision.">
|
||||||
|
GPS receivers measure elevations much less precisely than latitude and longitude. Elevations
|
||||||
|
can sometimes be off by a few hundred feet, though relative changes are tracked more precisely.
|
||||||
|
To get a good elevation measurement, make sure that you have a strong GPS signal and wait a few
|
||||||
|
minutes for the elevation to settle to a stable value.
|
||||||
|
</string>
|
||||||
|
<string name="help_elevation_precision_question"
|
||||||
|
translation_description="In the 'Help' page, the question on elevation precision.">
|
||||||
|
How precise is the elevation measurement?
|
||||||
|
</string>
|
||||||
|
<string name="help_gps_fix_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on the GPS fix message.">
|
||||||
|
For My Tracks to work, your phone needs to be in line-of-sight contact with the GPS satellites.
|
||||||
|
If the line-of-sight is obstructed by trees, buildings or canyon walls, you may not get an
|
||||||
|
accurate fix. If you see the message, wait a minute or two. If your device does not achieve a
|
||||||
|
fix, move to an area clear of obstructions and try again.
|
||||||
|
</string>
|
||||||
|
<string name="help_gps_fix_question"
|
||||||
|
translation_description="In the 'Help' page, the question on the GPS fix message.">
|
||||||
|
Why does the application sometimes display \"Waiting for a better GPS fix.\"?
|
||||||
|
</string>
|
||||||
|
<string name="help_location_precision_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on location precision.">
|
||||||
|
Under optimal conditions, the location error can be +/- 20 feet (6 meters). However, precision
|
||||||
|
depends on the quality of the GPS signal. The blue circle around the orange location arrow
|
||||||
|
indicates estimated precision. (You may need to zoom in or out to see the circle.) You can
|
||||||
|
change the GPS precision at Settings -> Recording -> GPS accuracy.
|
||||||
|
</string>
|
||||||
|
<string name="help_location_precision_question"
|
||||||
|
translation_description="In the 'Help' page, the question on location precision.">
|
||||||
|
How precise are the recorded tracks?
|
||||||
|
</string>
|
||||||
|
<string name="help_my_tracks_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on what is My Tracks.">
|
||||||
|
My Tracks allows you to record GPS tracks and visualize your hiking, running, biking or any
|
||||||
|
other activity while watching live performance statistics. My Tracks makes it easy to archive
|
||||||
|
your training history with Google Maps, Google Fusion Tables, and Google Docs, and share your
|
||||||
|
activities with friends and the world.
|
||||||
|
</string>
|
||||||
|
<string name="help_my_tracks_question"
|
||||||
|
translation_description="In the 'Help' page, the question on what is My Tracks.">
|
||||||
|
What is My Tracks?
|
||||||
|
</string>
|
||||||
|
<string name="help_saved_files_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on saved files.">
|
||||||
|
You can use Google Earth or similar applications to visualize and edit GPS tracks.
|
||||||
|
</string>
|
||||||
|
<string name="help_saved_files_question"
|
||||||
|
translation_description="In the 'Help' page, the question on saved files.">
|
||||||
|
What can I do with tracks after saving them to the SD card or sharing such files with friends?
|
||||||
|
</string>
|
||||||
|
<string name="help_share_friends_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on sharing with friends.">
|
||||||
|
You can share a track as a link to Google Map or Google Fusion Table (you will be prompted to
|
||||||
|
upload the track first) or as a GPX, KML, CSV, or TCX file in an e-mail attachment.
|
||||||
|
</string>
|
||||||
|
<string name="help_share_friends_question"
|
||||||
|
translation_description="In the 'Help' page, the question on sharing with friends.">
|
||||||
|
How do I share tracks with friends and the rest of the world?
|
||||||
|
</string>
|
||||||
|
<string name="help_share_visibility_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on share visibility.">
|
||||||
|
By default, tracks sent to Google Maps and Google Fusion Tables are public. You can change the
|
||||||
|
visibility of your tracks in Google Maps and Google Fusion. For Google Maps, you can change the
|
||||||
|
default from public to unlisted in Settings -> Sharing.
|
||||||
|
</string>
|
||||||
|
<string name="help_share_visibility_question"
|
||||||
|
translation_description="In the 'Help' page, the question on share visibility.">
|
||||||
|
Who can see the tracks I send to Google Maps and Google Fusion Tables?
|
||||||
|
</string>
|
||||||
|
<string name="help_split_track_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on splitting long tracks.">
|
||||||
|
Tracks on Google Maps and Google Fusion Tables are limited to certain sizes.
|
||||||
|
</string>
|
||||||
|
<string name="help_split_track_question"
|
||||||
|
translation_description="In the 'Help' page, the question on splitting long tracks.">
|
||||||
|
Why do very long tracks split into multiple segments upon sending them to Google Maps and
|
||||||
|
Google Fusion Tables?
|
||||||
|
</string>
|
||||||
|
<string name="help_statistics_marker_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on statistics markers.">
|
||||||
|
Statistics markers are used to segment a track to calculate statistics for each segment. For
|
||||||
|
example, let\'s say you are recording a bike ride up a hill, you can insert a statistics marker
|
||||||
|
at the bottom of the hill and another at the top.
|
||||||
|
</string>
|
||||||
|
<string name="help_statistics_marker_question"
|
||||||
|
translation_description="In the 'Help' page, the question on statistics markers.">
|
||||||
|
What are statistics markers?
|
||||||
|
</string>
|
||||||
|
<string name="help_waypoint_marker_answer"
|
||||||
|
translation_description="In the 'Help' page, the answer on waypoint markers.">
|
||||||
|
Waypoint markers are used to annotate a location.
|
||||||
|
</string>
|
||||||
|
<string name="help_waypoint_marker_question"
|
||||||
|
translation_description="In the 'Help' page, the question on waypoint markers.">
|
||||||
|
What are waypoint markers?
|
||||||
|
</string>
|
||||||
|
|
||||||
<!-- Import -->
|
<!-- Import -->
|
||||||
<string name="import_error"
|
<string name="import_error"
|
||||||
translation_description="When importing all the tracks, a toast message indicating import error
|
translation_description="When importing all the tracks, a toast message indicating import error
|
||||||
@@ -2792,205 +2941,9 @@ limitations under the License.
|
|||||||
waypoint
|
waypoint
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<!-- Welcome Page -->
|
<!-- Welcome -->
|
||||||
<string name="welcome_about"
|
|
||||||
translation_description="In the 'Welcome' page, the button on the bottom to open the 'About My
|
|
||||||
Tracks' dialog.">
|
|
||||||
About My Tracks
|
|
||||||
</string>
|
|
||||||
<string name="welcome_add_graph_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on adding graphs to the
|
|
||||||
graphs view.">
|
|
||||||
In the graphs view, Menu -> Chart settings.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_add_graph_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on adding graphs to
|
|
||||||
the graphs view.">
|
|
||||||
How do I add more graphs?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_app_navigation_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on app navigation.">
|
|
||||||
Touch the map. Left and right arrows will appear. Tap on these arrows to cycle between the map,
|
|
||||||
statistics, and graphs view.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_app_navigation_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on app navigation.">
|
|
||||||
How do I see the map, statistics, and graphs view?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_battery_life_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on battery life.">
|
|
||||||
The GPS receiver draws a relatively high amount of power, so a fully charged battery typically
|
|
||||||
survives less than 5 hours. Battery life depends on many factors, including signal strength,
|
|
||||||
battery freshness, and tasks running in parallel. Switching off some or all of the phone\'s
|
|
||||||
radios will lengthen battery life. Putting the phone into Airplane mode will yield the best
|
|
||||||
results.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_battery_life_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on battery life.">
|
|
||||||
How long does the battery last when recording tracks?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_data_connection_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on data connection.">
|
|
||||||
Cell signal or data connection is not required to record GPS tracks. However, if there is no
|
|
||||||
data connection, you will not be able to see a map. Instead, you will see a grey screen or a
|
|
||||||
partial map. Tracks, represented as simple lines, can still be recorded even if there is no data
|
|
||||||
connection.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_data_connection_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on data connection.">
|
|
||||||
Do I need cell signal and data connection to use My Tracks?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_delete_all_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on deleting all
|
|
||||||
tracks.">
|
|
||||||
Menu -> Tracks -> Delete all. This permanently deletes the recorded tracks from memory. If you
|
|
||||||
have saved tracks to the SD card, you must delete them separately. Tracks uploaded to Google
|
|
||||||
Maps, Google Fusion Tables, and Google Docs must also be deleted separately.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_delete_all_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on deleting all
|
|
||||||
tracks.">
|
|
||||||
How do I delete all the tracks from the phone?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_edit_accuracy_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on editing points.">
|
|
||||||
Once you upload tracks to Google Maps, Google Fusion Tables, or Google Docs, you can move,
|
|
||||||
delete or insert individual track points as desired.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_edit_accuracy_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on editing points.">
|
|
||||||
How can I edit or correct tracks for accuracy?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_elevation_precision_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on elevation
|
|
||||||
precision.">
|
|
||||||
GPS receivers measure elevations much less precisely than latitude and longitude. Elevations
|
|
||||||
can sometimes be off by a few hundred feet, though relative changes are tracked more precisely.
|
|
||||||
To get a good elevation measurement, make sure that you have a strong GPS signal and wait a few
|
|
||||||
minutes for the elevation to settle to a stable value.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_elevation_precision_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on elevation
|
|
||||||
precision.">
|
|
||||||
How precise is the elevation measurement?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_gps_fix_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on the GPS fix
|
|
||||||
message.">
|
|
||||||
For My Tracks to work, your phone needs to be in line-of-sight contact with the GPS satellites.
|
|
||||||
If the line-of-sight is obstructed by trees, buildings or canyon walls, you may not get an
|
|
||||||
accurate fix. If you see the message, wait a minute or two. If your device does not achieve a
|
|
||||||
fix, move to an area clear of obstructions and try again.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_gps_fix_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on the GPS fix
|
|
||||||
message.">
|
|
||||||
Why does the application sometimes display \"Waiting for a better GPS fix. Make sure the sky is
|
|
||||||
visible.\"?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_location_precision_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on location precision.">
|
|
||||||
Under optimal conditions, the location error can be +/- 20 feet (6 meters). However, precision
|
|
||||||
depends on the quality of the GPS signal. The blue circle around the orange location arrow
|
|
||||||
indicates estimated precision. (You may need to zoom in or out to see the circle.) You can
|
|
||||||
change the GPS precision at Settings -> Recording -> GPS accuracy. If the precision is too low,
|
|
||||||
at the top of the screen, you will see the message \"Waiting for a better GPS fix.\".
|
|
||||||
</string>
|
|
||||||
<string name="welcome_location_precision_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on location
|
|
||||||
precision.">
|
|
||||||
How precise are the recorded tracks?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_maps_sharing_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on Google Maps
|
|
||||||
visibility.">
|
|
||||||
By default, new maps are public. To change the default to unlisted, uncheck Settings -> Sharing
|
|
||||||
-> Make new maps public. You can change the visibility of all your maps at My places in Google
|
|
||||||
Maps.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_maps_sharing_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on Google Maps
|
|
||||||
visibility.">
|
|
||||||
Who can see the maps I send to Google Maps?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_my_tracks_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on what is My Tracks.">
|
|
||||||
My Tracks allows you to record GPS tracks and visualize your hiking, running, biking or any
|
|
||||||
other activity while watching live performance statistics. My Tracks makes it easy to archive
|
|
||||||
your training history with Google Maps, Google Fusion Tables, and Google Docs, and share your
|
|
||||||
activities with friends and the world.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_my_tracks_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on what is My
|
|
||||||
Tracks.">
|
|
||||||
What is My Tracks?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_send_google_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on sending a track to
|
|
||||||
Google.">
|
|
||||||
Tap the Options button located at the bottom right corner of the map view and select \"Send to
|
|
||||||
Google...\".
|
|
||||||
</string>
|
|
||||||
<string name="welcome_send_google_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on sending a track to
|
|
||||||
Google.">
|
|
||||||
How do I send my tracks to Google Maps, Google Fusion Tables, and Google Docs?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_share_file_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on sharing a file.">
|
|
||||||
You can use Google Earth or similar applications to visualize and edit GPS tracks.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_share_file_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on sharing a file.">
|
|
||||||
What can I do with tracks after saving them to the SD card or sharing such files with friends?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_share_friends_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on sharing a track with
|
|
||||||
friends.">
|
|
||||||
Tap the Options button located at the bottom right corner of the map view and select \"Share
|
|
||||||
with friends...\". You can share the track as a link to Google Map or Google Fusion Table
|
|
||||||
(you will be prompted to upload the track first) or as a GPX, KML, CSV, or TCX file in an e-mail
|
|
||||||
attachment.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_share_friends_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on sharing a track
|
|
||||||
with friends.">
|
|
||||||
How do I share tracks with friends and the rest of the world?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_split_track_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on splitting long
|
|
||||||
tracks.">
|
|
||||||
Tracks on Google Maps and Google Fusion Tables are limited to certain sizes.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_split_track_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on splitting long
|
|
||||||
tracks.">
|
|
||||||
Why do very long tracks split into multiple segments upon sending them to Google Maps and
|
|
||||||
Google Fusion Tables?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_statistics_marker_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on statistics markers.">
|
|
||||||
Statistics markers are used to segment a track to calculate statistics for each segment. For
|
|
||||||
example, let\'s say you are recording a bike ride up a hill, you can insert a statistics marker
|
|
||||||
at the bottom of the hill and another at the top by pressing Menu -> Markers -> Insert
|
|
||||||
statistics.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_statistics_marker_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on statistics
|
|
||||||
markers.">
|
|
||||||
What are statistics markers?
|
|
||||||
</string>
|
|
||||||
<string name="welcome_title"
|
<string name="welcome_title"
|
||||||
translation_description="In the 'Welcome' page, the title of the page.">
|
translation_description="The title of the welcome dialog.">
|
||||||
My Tracks Welcome
|
Welcome to My Tracks
|
||||||
</string>
|
|
||||||
<string name="welcome_waypoint_marker_answer"
|
|
||||||
translation_description="In the 'Welcome' page, the help content answer on waypoint markers.">
|
|
||||||
Waypoint markers are used to annotate a location. For example, if you are recording a track and
|
|
||||||
you are close to an interesting place, press Menu -> Markers -> Insert waypoint.
|
|
||||||
</string>
|
|
||||||
<string name="welcome_waypoint_marker_question"
|
|
||||||
translation_description="In the 'Welcome' page, the help content question on waypoint markers.">
|
|
||||||
What are waypoint markers?
|
|
||||||
</string>
|
</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -17,34 +17,18 @@ limitations under the License.
|
|||||||
<resources>
|
<resources>
|
||||||
<style name="ThemeSelector" parent="android:Theme" />
|
<style name="ThemeSelector" parent="android:Theme" />
|
||||||
|
|
||||||
<!-- Button -->
|
<!-- Bottom Bar -->
|
||||||
<style name="Button">
|
<style name="BottomBar" parent="@android:style/DeviceDefault.ButtonBar">
|
||||||
<item name="android:layout_height">fill_parent</item>
|
|
||||||
<item name="android:layout_weight">1</item>
|
|
||||||
<item name="android:layout_width">0dp</item>
|
|
||||||
<item name="android:maxLines">2</item>
|
|
||||||
<item name="android:textSize">14sp</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- Button layout -->
|
|
||||||
<style name="ButtonLayout">
|
|
||||||
<item name="android:background">@drawable/list_bar</item>
|
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:layout_width">fill_parent</item>
|
<item name="android:layout_width">fill_parent</item>
|
||||||
<item name="android:measureWithLargestChild">true</item>
|
|
||||||
<item name="android:orientation">horizontal</item>
|
<item name="android:orientation">horizontal</item>
|
||||||
<item name="android:paddingLeft">2dp</item>
|
|
||||||
<item name="android:paddingRight">2dp</item>
|
|
||||||
<item name="android:paddingTop">4dp</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Button spacer -->
|
<!-- Bottom Button -->
|
||||||
<style name="ButtonSpacer">
|
<style name="BottomButton" parent="@android:style/Widget.DeviceDefault.Button.Borderless">
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:layout_weight">0.25</item>
|
<item name="android:layout_weight">1</item>
|
||||||
<item name="android:layout_width">0dp</item>
|
<item name="android:layout_width">0dp</item>
|
||||||
<item name="android:orientation">horizontal</item>
|
|
||||||
<item name="android:visibility">gone</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="SensorStateLabel">
|
<style name="SensorStateLabel">
|
||||||
@@ -126,27 +110,26 @@ limitations under the License.
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- The TextView showing the stats in the track list item -->
|
<!-- The TextView showing the stats in the track list item -->
|
||||||
<style name="TrackListItemStatsTextView" parents="@android:style/TextAppearance.DeviceDefault.Small">
|
<style name="TrackListItemStatsTextView" parent="@android:style/TextAppearance.DeviceDefault.Small">
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:layout_width">wrap_content</item>
|
<item name="android:layout_width">wrap_content</item>
|
||||||
<item name="android:singleLine">true</item>
|
<item name="android:singleLine">true</item>
|
||||||
<item name="android:textColor">@color/green</item>
|
<item name="android:textColor">@color/green</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Welcome page TextView -->
|
<!-- The welcome activity answer TextView -->
|
||||||
<style name="WelcomeTextView">
|
<style name="WelcomeAnswerTextView" parent="@android:style/TextAppearance.DeviceDefault.Small">
|
||||||
<item name="android:layout_height">wrap_content</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
<item name="android:layout_width">fill_parent</item>
|
<item name="android:layout_width">wrap_content</item>
|
||||||
<item name="android:paddingLeft">10sp</item>
|
<item name="android:paddingBottom">8dp</item>
|
||||||
<item name="android:paddingRight">10sp</item>
|
|
||||||
<item name="android:textColor">@color/black</item>
|
|
||||||
<item name="android:textSize">16sp</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Welcome page TextView question -->
|
<!-- The welcome activity question TextView -->
|
||||||
<style name="WelcomeTextView.Question">
|
<style name="WelcomeQuestionTextView" parent="@android:style/TextAppearance.DeviceDefault.Medium">
|
||||||
<item name="android:paddingTop">10sp</item>
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:paddingTop">8dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Widget TextView -->
|
<!-- Widget TextView -->
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2008 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.fragments.AboutDialogFragment;
|
||||||
|
import com.google.android.apps.mytracks.util.ApiAdapterFactory;
|
||||||
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.speech.tts.TextToSpeech;
|
||||||
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.View.OnClickListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An activity that displays the help page.
|
||||||
|
*
|
||||||
|
* @author Sandor Dornbush
|
||||||
|
*/
|
||||||
|
public class HelpActivity extends FragmentActivity {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setVolumeControlStream(TextToSpeech.Engine.DEFAULT_STREAM);
|
||||||
|
ApiAdapterFactory.getApiAdapter().configureActionBarHomeAsUp(this);
|
||||||
|
setContentView(R.layout.help);
|
||||||
|
|
||||||
|
findViewById(R.id.help_ok).setOnClickListener(new OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
findViewById(R.id.help_about).setOnClickListener(new OnClickListener() {
|
||||||
|
public void onClick(View v) {
|
||||||
|
new AboutDialogFragment().show(
|
||||||
|
getSupportFragmentManager(), AboutDialogFragment.ABOUT_DIALOG_TAG);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
if (item.getItemId() != android.R.id.home) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
startActivity(new Intent(this, TrackListActivity.class)
|
||||||
|
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -136,6 +136,7 @@ public class TrackDetailActivity extends FragmentActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setVolumeControlStream(TextToSpeech.Engine.DEFAULT_STREAM);
|
setVolumeControlStream(TextToSpeech.Engine.DEFAULT_STREAM);
|
||||||
|
ApiAdapterFactory.getApiAdapter().hideTitle(this);
|
||||||
ApiAdapterFactory.getApiAdapter().configureActionBarHomeAsUp(this);
|
ApiAdapterFactory.getApiAdapter().configureActionBarHomeAsUp(this);
|
||||||
setContentView(R.layout.track_detail);
|
setContentView(R.layout.track_detail);
|
||||||
|
|
||||||
@@ -428,7 +429,7 @@ public class TrackDetailActivity extends FragmentActivity {
|
|||||||
startActivity(new Intent(this, SettingsActivity.class));
|
startActivity(new Intent(this, SettingsActivity.class));
|
||||||
return true;
|
return true;
|
||||||
case R.id.track_detail_help:
|
case R.id.track_detail_help:
|
||||||
startActivity(new Intent(this, WelcomeActivity.class));
|
startActivity(new Intent(this, HelpActivity.class));
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.content.TracksColumns;
|
import com.google.android.apps.mytracks.content.TracksColumns;
|
||||||
import com.google.android.apps.mytracks.fragments.CheckUnitsDialogFragment;
|
|
||||||
import com.google.android.apps.mytracks.fragments.DeleteAllDialogFragment;
|
import com.google.android.apps.mytracks.fragments.DeleteAllDialogFragment;
|
||||||
import com.google.android.apps.mytracks.fragments.EulaDialogFragment;
|
import com.google.android.apps.mytracks.fragments.EulaDialogFragment;
|
||||||
import com.google.android.apps.mytracks.io.file.TrackWriterFactory.TrackFileFormat;
|
import com.google.android.apps.mytracks.io.file.TrackWriterFactory.TrackFileFormat;
|
||||||
@@ -25,7 +24,6 @@ import com.google.android.apps.mytracks.services.ITrackRecordingService;
|
|||||||
import com.google.android.apps.mytracks.services.ServiceUtils;
|
import com.google.android.apps.mytracks.services.ServiceUtils;
|
||||||
import com.google.android.apps.mytracks.services.TrackRecordingServiceConnection;
|
import com.google.android.apps.mytracks.services.TrackRecordingServiceConnection;
|
||||||
import com.google.android.apps.mytracks.util.ApiAdapterFactory;
|
import com.google.android.apps.mytracks.util.ApiAdapterFactory;
|
||||||
import com.google.android.apps.mytracks.util.CheckUnitsUtils;
|
|
||||||
import com.google.android.apps.mytracks.util.EulaUtils;
|
import com.google.android.apps.mytracks.util.EulaUtils;
|
||||||
import com.google.android.apps.mytracks.util.StringUtils;
|
import com.google.android.apps.mytracks.util.StringUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
@@ -39,9 +37,7 @@ import android.os.Bundle;
|
|||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.speech.tts.TextToSpeech;
|
import android.speech.tts.TextToSpeech;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.Fragment;
|
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
|
||||||
import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
import android.support.v4.app.LoaderManager.LoaderCallbacks;
|
||||||
import android.support.v4.content.CursorLoader;
|
import android.support.v4.content.CursorLoader;
|
||||||
import android.support.v4.content.Loader;
|
import android.support.v4.content.Loader;
|
||||||
@@ -65,11 +61,6 @@ import android.widget.Toast;
|
|||||||
public class TrackListActivity extends FragmentActivity {
|
public class TrackListActivity extends FragmentActivity {
|
||||||
|
|
||||||
private static final String TAG = TrackListActivity.class.getSimpleName();
|
private static final String TAG = TrackListActivity.class.getSimpleName();
|
||||||
private static final String CHECK_UNITS_DIALOG_TAG = "checkUnitsDialog";
|
|
||||||
private static final String DELETE_ALL_DIALOG_TAG = "deleteAllDialog";
|
|
||||||
private static final String EULA_DIALOG_TAG = "eulaDialog";
|
|
||||||
|
|
||||||
public static final int WELCOME_ACTIVITY_REQUEST_CODE = 0;
|
|
||||||
|
|
||||||
private static final String[] PROJECTION = new String[] {
|
private static final String[] PROJECTION = new String[] {
|
||||||
TracksColumns._ID,
|
TracksColumns._ID,
|
||||||
@@ -237,9 +228,11 @@ public class TrackListActivity extends FragmentActivity {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!EulaUtils.getEulaValue(this)) {
|
if (!EulaUtils.getEulaValue(this)) {
|
||||||
Fragment fragment = getSupportFragmentManager().findFragmentByTag(EULA_DIALOG_TAG);
|
Fragment fragment = getSupportFragmentManager()
|
||||||
|
.findFragmentByTag(EulaDialogFragment.EULA_DIALOG_TAG);
|
||||||
if (fragment == null) {
|
if (fragment == null) {
|
||||||
new EulaDialogFragment().show(getSupportFragmentManager(), EULA_DIALOG_TAG);
|
EulaDialogFragment.newInstance(false).show(
|
||||||
|
getSupportFragmentManager(), EulaDialogFragment.EULA_DIALOG_TAG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,24 +249,6 @@ public class TrackListActivity extends FragmentActivity {
|
|||||||
trackRecordingServiceConnection.unbind();
|
trackRecordingServiceConnection.unbind();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onActivityResult(int requestCode, int resultCode, final Intent results) {
|
|
||||||
if (requestCode == WELCOME_ACTIVITY_REQUEST_CODE) {
|
|
||||||
if (!CheckUnitsUtils.getCheckUnitsValue(this)) {
|
|
||||||
/*
|
|
||||||
* See bug http://code.google.com/p/android/issues/detail?id=23761.
|
|
||||||
* Cannot use
|
|
||||||
* CheckUnitsDialogFragment().show(getSupportFragmentManager(),
|
|
||||||
* CHECK_UNITS_DIALOG_TAG). Need to use commitAllowingStateLoss with the
|
|
||||||
* support package.
|
|
||||||
*/
|
|
||||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
|
||||||
fragmentTransaction.add(new CheckUnitsDialogFragment(), CHECK_UNITS_DIALOG_TAG);
|
|
||||||
fragmentTransaction.commitAllowingStateLoss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
getMenuInflater().inflate(R.menu.track_list, menu);
|
getMenuInflater().inflate(R.menu.track_list, menu);
|
||||||
@@ -364,7 +339,8 @@ public class TrackListActivity extends FragmentActivity {
|
|||||||
ExportActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.TCX));
|
ExportActivity.EXTRA_TRACK_FILE_FORMAT, (Parcelable) TrackFileFormat.TCX));
|
||||||
return true;
|
return true;
|
||||||
case R.id.track_list_delete_all:
|
case R.id.track_list_delete_all:
|
||||||
new DeleteAllDialogFragment().show(getSupportFragmentManager(), DELETE_ALL_DIALOG_TAG);
|
new DeleteAllDialogFragment().show(
|
||||||
|
getSupportFragmentManager(), DeleteAllDialogFragment.DELETE_ALL_DIALOG_TAG);
|
||||||
return true;
|
return true;
|
||||||
case R.id.track_list_aggregated_statistics:
|
case R.id.track_list_aggregated_statistics:
|
||||||
startActivity(new Intent(this, AggregatedStatsActivity.class));
|
startActivity(new Intent(this, AggregatedStatsActivity.class));
|
||||||
@@ -373,7 +349,7 @@ public class TrackListActivity extends FragmentActivity {
|
|||||||
startActivity(new Intent(this, SettingsActivity.class));
|
startActivity(new Intent(this, SettingsActivity.class));
|
||||||
return true;
|
return true;
|
||||||
case R.id.track_list_help:
|
case R.id.track_list_help:
|
||||||
startActivity(new Intent(this, WelcomeActivity.class));
|
startActivity(new Intent(this, HelpActivity.class));
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
|
|||||||
@@ -1,87 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2008 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.
|
|
||||||
*/
|
|
||||||
package com.google.android.apps.mytracks;
|
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.util.EulaUtils;
|
|
||||||
import com.google.android.apps.mytracks.util.SystemUtils;
|
|
||||||
import com.google.android.maps.mytracks.R;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An activity that displays a welcome screen.
|
|
||||||
*
|
|
||||||
* @author Sandor Dornbush
|
|
||||||
*/
|
|
||||||
public class WelcomeActivity extends Activity {
|
|
||||||
|
|
||||||
private static final int DIALOG_ABOUT_ID = 0;
|
|
||||||
private static final int DIALOG_EULA_ID = 1;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.welcome);
|
|
||||||
findViewById(R.id.welcome_ok).setOnClickListener(new OnClickListener() {
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
findViewById(R.id.welcome_about).setOnClickListener(new OnClickListener() {
|
|
||||||
public void onClick(View v) {
|
|
||||||
showDialog(DIALOG_ABOUT_ID);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Dialog onCreateDialog(int id) {
|
|
||||||
switch (id) {
|
|
||||||
case DIALOG_ABOUT_ID:
|
|
||||||
View view = getLayoutInflater().inflate(R.layout.about, null);
|
|
||||||
TextView aboutVersion = (TextView) view.findViewById(R.id.about_version);
|
|
||||||
aboutVersion.setText(SystemUtils.getMyTracksVersion(this));
|
|
||||||
return new AlertDialog.Builder(this)
|
|
||||||
.setCancelable(true)
|
|
||||||
.setNegativeButton(R.string.about_license, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
showDialog(DIALOG_EULA_ID);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setPositiveButton(R.string.generic_ok, null)
|
|
||||||
.setTitle(R.string.my_tracks_app_name)
|
|
||||||
.setView(view)
|
|
||||||
.create();
|
|
||||||
case DIALOG_EULA_ID:
|
|
||||||
return new AlertDialog.Builder(this)
|
|
||||||
.setCancelable(true)
|
|
||||||
.setMessage(EulaUtils.getEulaMessage(this))
|
|
||||||
.setPositiveButton(R.string.generic_ok, null)
|
|
||||||
.setTitle(R.string.eula_title)
|
|
||||||
.create();
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.apps.mytracks.fragments;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.util.SystemUtils;
|
||||||
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A DialogFragment to show information about My Tracks.
|
||||||
|
*
|
||||||
|
* @author Jimmy Shih
|
||||||
|
*/
|
||||||
|
public class AboutDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
|
public static final String ABOUT_DIALOG_TAG = "aboutDialog";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
View view = getActivity().getLayoutInflater().inflate(R.layout.about, null);
|
||||||
|
TextView aboutVersion = (TextView) view.findViewById(R.id.about_version);
|
||||||
|
aboutVersion.setText(SystemUtils.getMyTracksVersion(getActivity()));
|
||||||
|
return new AlertDialog.Builder(getActivity())
|
||||||
|
.setCancelable(true)
|
||||||
|
.setNegativeButton(R.string.about_license, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
EulaDialogFragment.newInstance(true).show(
|
||||||
|
getActivity().getSupportFragmentManager(), EulaDialogFragment.EULA_DIALOG_TAG);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setPositiveButton(R.string.generic_ok, null)
|
||||||
|
.setTitle(R.string.help_about)
|
||||||
|
.setView(view)
|
||||||
|
.create();
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
-2
@@ -30,20 +30,27 @@ import android.os.Bundle;
|
|||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check Units DialogFragment.
|
* A DialogFragment to check preferred units.
|
||||||
|
*
|
||||||
|
* @author Jimmy Shih
|
||||||
*/
|
*/
|
||||||
public class CheckUnitsDialogFragment extends DialogFragment {
|
public class CheckUnitsDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
|
public static final String CHECK_UNITS_DIALOG_TAG = "checkUnitsDialog";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
|
||||||
return new AlertDialog.Builder(getActivity()).setCancelable(true)
|
return new AlertDialog.Builder(getActivity())
|
||||||
|
.setCancelable(true)
|
||||||
.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||||
|
@Override
|
||||||
public void onCancel(DialogInterface dialog) {
|
public void onCancel(DialogInterface dialog) {
|
||||||
CheckUnitsUtils.setCheckUnitsValue(getActivity());
|
CheckUnitsUtils.setCheckUnitsValue(getActivity());
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setPositiveButton(R.string.generic_ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.generic_ok, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
CheckUnitsUtils.setCheckUnitsValue(getActivity());
|
CheckUnitsUtils.setCheckUnitsValue(getActivity());
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -26,10 +26,14 @@ import android.os.Bundle;
|
|||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete All DialogFragment.
|
* A DialogFragment to delete all tracks.
|
||||||
|
*
|
||||||
|
* @author Jimmy Shih
|
||||||
*/
|
*/
|
||||||
public class DeleteAllDialogFragment extends DialogFragment {
|
public class DeleteAllDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
|
public static final String DELETE_ALL_DIALOG_TAG = "deleteAllDialog";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
return DialogUtils.createConfirmationDialog(getActivity(),
|
return DialogUtils.createConfirmationDialog(getActivity(),
|
||||||
|
|||||||
@@ -16,49 +16,71 @@
|
|||||||
|
|
||||||
package com.google.android.apps.mytracks.fragments;
|
package com.google.android.apps.mytracks.fragments;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.TrackListActivity;
|
|
||||||
import com.google.android.apps.mytracks.WelcomeActivity;
|
|
||||||
import com.google.android.apps.mytracks.util.EulaUtils;
|
import com.google.android.apps.mytracks.util.EulaUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Eula DialogFragment.
|
* A DialogFragment to show EULA.
|
||||||
|
*
|
||||||
|
* @author Jimmy Shih
|
||||||
*/
|
*/
|
||||||
public class EulaDialogFragment extends DialogFragment {
|
public class EulaDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
|
public static final String EULA_DIALOG_TAG = "eulaDialog";
|
||||||
|
private static final String KEY_HAS_ACCEPTED = "hasAccepted";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance of {@link EulaDialogFragment}.
|
||||||
|
*
|
||||||
|
* @param hasAccepted true if the user has accepted the eula.
|
||||||
|
*/
|
||||||
|
public static EulaDialogFragment newInstance(boolean hasAccepted) {
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putBoolean(KEY_HAS_ACCEPTED, hasAccepted);
|
||||||
|
|
||||||
|
EulaDialogFragment eulaDialogFragment = new EulaDialogFragment();
|
||||||
|
eulaDialogFragment.setArguments(bundle);
|
||||||
|
return eulaDialogFragment;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
return new AlertDialog.Builder(getActivity())
|
boolean hasAccepted = getArguments().getBoolean(KEY_HAS_ACCEPTED);
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setMessage(EulaUtils.getEulaMessage(getActivity()))
|
.setMessage(EulaUtils.getEulaMessage(getActivity()))
|
||||||
.setNegativeButton(R.string.eula_decline, new DialogInterface.OnClickListener() {
|
.setTitle(R.string.eula_title);
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
if (hasAccepted) {
|
||||||
getActivity().finish();
|
builder.setPositiveButton(R.string.generic_ok, null);
|
||||||
}
|
} else {
|
||||||
})
|
builder.setNegativeButton(R.string.eula_decline, new DialogInterface.OnClickListener() {
|
||||||
.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
@Override
|
||||||
@Override
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
public void onCancel(DialogInterface dialog) {
|
getActivity().finish();
|
||||||
getActivity().finish();
|
}
|
||||||
}
|
})
|
||||||
})
|
.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||||
.setPositiveButton(R.string.eula_accept, new DialogInterface.OnClickListener() {
|
@Override
|
||||||
@Override
|
public void onCancel(DialogInterface dialog) {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
getActivity().finish();
|
||||||
EulaUtils.setEulaValue(getActivity());
|
}
|
||||||
getActivity().startActivityForResult(
|
})
|
||||||
new Intent(getActivity(), WelcomeActivity.class), TrackListActivity.WELCOME_ACTIVITY_REQUEST_CODE);
|
.setPositiveButton(R.string.eula_accept, new DialogInterface.OnClickListener() {
|
||||||
}
|
@Override
|
||||||
})
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
.setTitle(R.string.eula_title)
|
EulaUtils.setEulaValue(getActivity());
|
||||||
.create();
|
new WelcomeDialogFragment().show(
|
||||||
|
getActivity().getSupportFragmentManager(), WelcomeDialogFragment.WELCOME_DIALOG_TAG);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return builder.create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.google.android.apps.mytracks.fragments;
|
||||||
|
|
||||||
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.v4.app.DialogFragment;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A DialogFrament to show the welcome info.
|
||||||
|
*
|
||||||
|
* @author Jimmy Shih
|
||||||
|
*/
|
||||||
|
public class WelcomeDialogFragment extends DialogFragment {
|
||||||
|
|
||||||
|
public static final String WELCOME_DIALOG_TAG = "welcomeDialog";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
View view = getActivity().getLayoutInflater().inflate(R.layout.welcome, null);
|
||||||
|
return new AlertDialog.Builder(getActivity())
|
||||||
|
.setCancelable(true)
|
||||||
|
.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||||
|
@Override
|
||||||
|
public void onCancel(DialogInterface dialog) {
|
||||||
|
checkUnits();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setPositiveButton(R.string.generic_ok, new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
checkUnits();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setTitle(R.string.welcome_title)
|
||||||
|
.setView(view)
|
||||||
|
.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkUnits() {
|
||||||
|
new CheckUnitsDialogFragment().show(
|
||||||
|
getActivity().getSupportFragmentManager(), CheckUnitsDialogFragment.CHECK_UNITS_DIALOG_TAG);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,6 +32,11 @@ import android.widget.SearchView;
|
|||||||
@TargetApi(11)
|
@TargetApi(11)
|
||||||
public class Api11Adapter extends Api10Adapter {
|
public class Api11Adapter extends Api10Adapter {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hideTitle(Activity activity) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configureActionBarHomeAsUp(Activity activity) {
|
public void configureActionBarHomeAsUp(Activity activity) {
|
||||||
ActionBar actionBar = activity.getActionBar();
|
ActionBar actionBar = activity.getActionBar();
|
||||||
|
|||||||
@@ -104,12 +104,15 @@ public class Api7Adapter implements ApiAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configureActionBarHomeAsUp(Activity activity) {
|
public void hideTitle(Activity activity) {
|
||||||
// Action bar not available, just hide the title and let actions be shown
|
|
||||||
// via the regular menu.
|
|
||||||
activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configureActionBarHomeAsUp(Activity activity) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configureSearchWidget(Activity activity, MenuItem menuItem) {
|
public void configureSearchWidget(Activity activity, MenuItem menuItem) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
|
|||||||
@@ -102,12 +102,24 @@ public interface ApiAdapter {
|
|||||||
public BluetoothSocket getBluetoothSocket(BluetoothDevice bluetoothDevice) throws IOException;
|
public BluetoothSocket getBluetoothSocket(BluetoothDevice bluetoothDevice) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures the action bar with the Home button as an Up button. If the
|
* Hides the title. If the platform supports the action bar, do nothing.
|
||||||
* system doesn't support action bar, hide the title bar.
|
* Ideally, with the action bar, we would like to collapse the navigation tabs
|
||||||
|
* into the action bar. However, collapsing is not supported by the
|
||||||
|
* compatibility library.
|
||||||
* <p>
|
* <p>
|
||||||
* Due to changes in API level 11.
|
* Due to changes in API level 11.
|
||||||
*
|
*
|
||||||
* @param activity the current activity
|
* @param activity the activity
|
||||||
|
*/
|
||||||
|
public void hideTitle(Activity activity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures the action bar with the Home button as an Up button. If the
|
||||||
|
* platform doesn't support the action bar, do nothing.
|
||||||
|
* <p>
|
||||||
|
* Due to changes in API level 11.
|
||||||
|
*
|
||||||
|
* @param activity the activity
|
||||||
*/
|
*/
|
||||||
public void configureActionBarHomeAsUp(Activity activity);
|
public void configureActionBarHomeAsUp(Activity activity);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user