Place kml before gpx

This commit is contained in:
Jimmy Shih
2013-06-07 13:58:12 -07:00
parent 636f78f78a
commit 0c7f61891e
6 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -65,10 +65,10 @@ limitations under the License.
android:id="@+id/export_external_storage_options" android:id="@+id/export_external_storage_options"
style="@style/ExportRadioGroup" > style="@style/ExportRadioGroup" >
<RadioButton <RadioButton
android:id="@+id/export_external_storage_gpx" android:id="@+id/export_external_storage_kml"
style="@style/TextMedium" /> style="@style/TextMedium" />
<RadioButton <RadioButton
android:id="@+id/export_external_storage_kml" android:id="@+id/export_external_storage_gpx"
style="@style/TextMedium" /> style="@style/TextMedium" />
<RadioButton <RadioButton
android:id="@+id/export_external_storage_csv" android:id="@+id/export_external_storage_csv"
@@ -93,8 +93,8 @@ limitations under the License.
<item>-1</item> <item>-1</item>
</string-array> </string-array>
<string-array name="file_types"> <string-array name="file_types">
<item>GPX</item>
<item>KML</item> <item>KML</item>
<item>GPX</item>
<item>CSV</item> <item>CSV</item>
<item>TCX</item> <item>TCX</item>
</string-array> </string-array>
+10 -10
View File
@@ -617,7 +617,7 @@ limitations under the License.
translation_description="When exporting all tracks to the external storage, the option to export translation_description="When exporting all tracks to the external storage, the option to export
as a certain file format. as a certain file format.
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'."> %1$s: file format. 'KML', 'GPX', 'CSV', or 'TCX'.">
Export all as %1$s Export all as %1$s
</string> </string>
<string name="export_all_title" <string name="export_all_title"
@@ -634,27 +634,27 @@ limitations under the License.
%1$d the number of tracks successfully exported. E.g., '1'. %1$d the number of tracks successfully exported. E.g., '1'.
%1$s the number of tracks to export. E.g., '2 tracks'. %1$s the number of tracks to export. E.g., '2 tracks'.
%2$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'."> %2$s the directory. E.g., '/storage/sdcard0/MyTracks/kml/'.">
Exported %1$d of %2$s to %3$s. Exported %1$d of %2$s to %3$s.
</string> </string>
<string name="export_external_storage_option" <string name="export_external_storage_option"
translation_description="When exporting a track to the external storage, the option to export as translation_description="When exporting a track to the external storage, the option to export as
a certain file format. a certain file format.
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'."> %1$s: file format. 'KML', 'GPX', 'CSV', or 'TCX'.">
as %1$s file as %1$s file
</string> </string>
<string name="export_external_storage_progress_message" <string name="export_external_storage_progress_message"
translation_description="When exporting tracks to the external storage, the progress message. translation_description="When exporting tracks to the external storage, the progress message.
%1$s: the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'."> %1$s: the directory. E.g., '/storage/sdcard0/MyTracks/kml/'.">
Exporting to %1$s&#8230; Exporting to %1$s&#8230;
</string> </string>
<string name="export_external_storage_success" <string name="export_external_storage_success"
translation_description="When exporting tracks to the external storage, the success message. translation_description="When exporting tracks to the external storage, the success message.
%1$s the number of tracks. E.g., '2 tracks'. %1$s the number of tracks. E.g., '2 tracks'.
%2$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'."> %2$s the directory. E.g., '/storage/sdcard0/MyTracks/kml/'.">
Exported %1$s to %2$s. Exported %1$s to %2$s.
</string> </string>
<string name="export_google_drive" <string name="export_google_drive"
@@ -918,27 +918,27 @@ limitations under the License.
%1$d the number of files successfully imported. E.g., '2'. %1$d the number of files successfully imported. E.g., '2'.
%2$s the number of files in the directory. E.g., '2 files'. %2$s the number of files in the directory. E.g., '2 files'.
%3$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'."> %3$s the directory. E.g., '/storage/sdcard0/MyTracks/kml/'.">
Imported %1$d of %2$s from %3$s. Imported %1$d of %2$s from %3$s.
</string> </string>
<string name="import_no_directory" <string name="import_no_directory"
translation_description="When importing from the external storage, the error message when the translation_description="When importing from the external storage, the error message when the
directory doesn't exist. directory doesn't exist.
%1$s: the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'."> %1$s: the directory. E.g., '/storage/sdcard0/MyTracks/kml/'.">
%1$s does not exist. %1$s does not exist.
</string> </string>
<string name="import_progress_message" <string name="import_progress_message"
translation_description="When importing from the external storage, the progress message. translation_description="When importing from the external storage, the progress message.
%1$s: the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'."> %1$s: the directory. E.g., '/storage/sdcard0/MyTracks/kml/'.">
Importing from %1$s&#8230; Importing from %1$s&#8230;
</string> </string>
<string name="import_selection_option" <string name="import_selection_option"
translation_description="When importing from external storage, the option to import all the translation_description="When importing from external storage, the option to import all the
files of a certain file format. files of a certain file format.
%1$s: file format. 'GPX', 'KML', 'CSV', or 'TCX'."> %1$s: file format. 'KML', 'GPX', 'CSV', or 'TCX'.">
Import all %1$s Import all %1$s
</string> </string>
<string name="import_selection_title" <string name="import_selection_title"
@@ -949,7 +949,7 @@ limitations under the License.
translation_description="When importing from the external storage, the success message. translation_description="When importing from the external storage, the success message.
%1$s the number of files. E.g., '2 files'. %1$s the number of files. E.g., '2 files'.
%2$s the directory. E.g., '/storage/sdcard0/MyTracks/gpx/'."> %2$s the directory. E.g., '/storage/sdcard0/MyTracks/kml/'.">
Imported %1$s from %2$s. Imported %1$s from %2$s.
</string> </string>
@@ -120,10 +120,10 @@ public class ExportDialogFragment extends DialogFragment {
exportGoogleFusionTablesPublic ? R.id.export_google_fusion_tables_public exportGoogleFusionTablesPublic ? R.id.export_google_fusion_tables_public
: R.id.export_google_fusion_tables_private); : R.id.export_google_fusion_tables_private);
setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_gpx), TrackFileFormat.GPX);
setExternalStorageOption( setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_kml), TrackFileFormat.KML); (RadioButton) view.findViewById(R.id.export_external_storage_kml), TrackFileFormat.KML);
setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_gpx), TrackFileFormat.GPX);
setExternalStorageOption( setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_csv), TrackFileFormat.CSV); (RadioButton) view.findViewById(R.id.export_external_storage_csv), TrackFileFormat.CSV);
setExternalStorageOption( setExternalStorageOption(
@@ -179,10 +179,10 @@ public class ExportDialogFragment extends DialogFragment {
*/ */
private int getExternalStorageFormatId(TrackFileFormat trackFileFormat) { private int getExternalStorageFormatId(TrackFileFormat trackFileFormat) {
switch (trackFileFormat) { switch (trackFileFormat) {
case GPX:
return R.id.export_external_storage_gpx;
case KML: case KML:
return R.id.export_external_storage_kml; return R.id.export_external_storage_kml;
case GPX:
return R.id.export_external_storage_gpx;
case CSV: case CSV:
return R.id.export_external_storage_csv; return R.id.export_external_storage_csv;
default: default:
@@ -197,10 +197,10 @@ public class ExportDialogFragment extends DialogFragment {
*/ */
private TrackFileFormat getTrackFileFormat(int externalStorageFormatId) { private TrackFileFormat getTrackFileFormat(int externalStorageFormatId) {
switch (externalStorageFormatId) { switch (externalStorageFormatId) {
case R.id.export_external_storage_gpx:
return TrackFileFormat.GPX;
case R.id.export_external_storage_kml: case R.id.export_external_storage_kml:
return TrackFileFormat.KML; return TrackFileFormat.KML;
case R.id.export_external_storage_gpx:
return TrackFileFormat.GPX;
case R.id.export_external_storage_csv: case R.id.export_external_storage_csv:
return TrackFileFormat.CSV; return TrackFileFormat.CSV;
default: default:
@@ -10,18 +10,18 @@ import java.util.Locale;
* Definition of all possible track formats. * Definition of all possible track formats.
*/ */
public enum TrackFileFormat implements Parcelable { public enum TrackFileFormat implements Parcelable {
GPX {
@Override
TrackFormatWriter newFormatWriter(Context context) {
return new GpxTrackWriter(context);
}
},
KML { KML {
@Override @Override
TrackFormatWriter newFormatWriter(Context context) { TrackFormatWriter newFormatWriter(Context context) {
return new KmlTrackWriter(context); return new KmlTrackWriter(context);
} }
}, },
GPX {
@Override
TrackFormatWriter newFormatWriter(Context context) {
return new GpxTrackWriter(context);
}
},
CSV { CSV {
@Override @Override
public TrackFormatWriter newFormatWriter(Context context) { public TrackFormatWriter newFormatWriter(Context context) {
@@ -77,8 +77,8 @@ public class RemoveTempFilesService extends Service {
// Can't do anything // Can't do anything
return null; return null;
} }
cleanTempDirectory(TrackFileFormat.GPX.getExtension());
cleanTempDirectory(TrackFileFormat.KML.getExtension()); cleanTempDirectory(TrackFileFormat.KML.getExtension());
cleanTempDirectory(TrackFileFormat.GPX.getExtension());
cleanTempDirectory(TrackFileFormat.CSV.getExtension()); cleanTempDirectory(TrackFileFormat.CSV.getExtension());
cleanTempDirectory(TrackFileFormat.TCX.getExtension()); cleanTempDirectory(TrackFileFormat.TCX.getExtension());
return null; return null;