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"
style="@style/ExportRadioGroup" >
<RadioButton
android:id="@+id/export_external_storage_gpx"
android:id="@+id/export_external_storage_kml"
style="@style/TextMedium" />
<RadioButton
android:id="@+id/export_external_storage_kml"
android:id="@+id/export_external_storage_gpx"
style="@style/TextMedium" />
<RadioButton
android:id="@+id/export_external_storage_csv"
@@ -93,8 +93,8 @@ limitations under the License.
<item>-1</item>
</string-array>
<string-array name="file_types">
<item>GPX</item>
<item>KML</item>
<item>GPX</item>
<item>CSV</item>
<item>TCX</item>
</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
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
</string>
<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$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.
</string>
<string name="export_external_storage_option"
translation_description="When exporting a track to the external storage, the option to export as
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
</string>
<string name="export_external_storage_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;
</string>
<string name="export_external_storage_success"
translation_description="When exporting tracks to the external storage, the success message.
%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.
</string>
<string name="export_google_drive"
@@ -918,27 +918,27 @@ limitations under the License.
%1$d the number of files successfully imported. E.g., '2'.
%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.
</string>
<string name="import_no_directory"
translation_description="When importing from the external storage, the error message when the
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.
</string>
<string name="import_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;
</string>
<string name="import_selection_option"
translation_description="When importing from external storage, the option to import all the
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
</string>
<string name="import_selection_title"
@@ -949,7 +949,7 @@ limitations under the License.
translation_description="When importing from the external storage, the success message.
%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.
</string>
@@ -120,10 +120,10 @@ public class ExportDialogFragment extends DialogFragment {
exportGoogleFusionTablesPublic ? R.id.export_google_fusion_tables_public
: R.id.export_google_fusion_tables_private);
setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_gpx), TrackFileFormat.GPX);
setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_kml), TrackFileFormat.KML);
setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_gpx), TrackFileFormat.GPX);
setExternalStorageOption(
(RadioButton) view.findViewById(R.id.export_external_storage_csv), TrackFileFormat.CSV);
setExternalStorageOption(
@@ -179,10 +179,10 @@ public class ExportDialogFragment extends DialogFragment {
*/
private int getExternalStorageFormatId(TrackFileFormat trackFileFormat) {
switch (trackFileFormat) {
case GPX:
return R.id.export_external_storage_gpx;
case KML:
return R.id.export_external_storage_kml;
case GPX:
return R.id.export_external_storage_gpx;
case CSV:
return R.id.export_external_storage_csv;
default:
@@ -197,10 +197,10 @@ public class ExportDialogFragment extends DialogFragment {
*/
private TrackFileFormat getTrackFileFormat(int externalStorageFormatId) {
switch (externalStorageFormatId) {
case R.id.export_external_storage_gpx:
return TrackFileFormat.GPX;
case R.id.export_external_storage_kml:
return TrackFileFormat.KML;
case R.id.export_external_storage_gpx:
return TrackFileFormat.GPX;
case R.id.export_external_storage_csv:
return TrackFileFormat.CSV;
default:
@@ -10,18 +10,18 @@ import java.util.Locale;
* Definition of all possible track formats.
*/
public enum TrackFileFormat implements Parcelable {
GPX {
@Override
TrackFormatWriter newFormatWriter(Context context) {
return new GpxTrackWriter(context);
}
},
KML {
@Override
TrackFormatWriter newFormatWriter(Context context) {
return new KmlTrackWriter(context);
}
},
GPX {
@Override
TrackFormatWriter newFormatWriter(Context context) {
return new GpxTrackWriter(context);
}
},
CSV {
@Override
public TrackFormatWriter newFormatWriter(Context context) {
@@ -77,8 +77,8 @@ public class RemoveTempFilesService extends Service {
// Can't do anything
return null;
}
cleanTempDirectory(TrackFileFormat.GPX.getExtension());
cleanTempDirectory(TrackFileFormat.KML.getExtension());
cleanTempDirectory(TrackFileFormat.GPX.getExtension());
cleanTempDirectory(TrackFileFormat.CSV.getExtension());
cleanTempDirectory(TrackFileFormat.TCX.getExtension());
return null;