forked from upstream-mirrors/OpenTracks
Removed export stuff.
This commit is contained in:
@@ -408,8 +408,7 @@ public class TrackDetailActivity extends AbstractSendToGoogleActivity
|
|||||||
case R.id.track_detail_export:
|
case R.id.track_detail_export:
|
||||||
Track track = myTracksProviderUtils.getTrack(trackId);
|
Track track = myTracksProviderUtils.getTrack(trackId);
|
||||||
boolean hideDrive = track != null ? track.isSharedWithMe() : true;
|
boolean hideDrive = track != null ? track.isSharedWithMe() : true;
|
||||||
ExportDialogFragment.newInstance(hideDrive)
|
new ExportDialogFragment().show(getSupportFragmentManager(), ExportDialogFragment.EXPORT_DIALOG_TAG);
|
||||||
.show(getSupportFragmentManager(), ExportDialogFragment.EXPORT_DIALOG_TAG);
|
|
||||||
return true;
|
return true;
|
||||||
case R.id.track_detail_edit:
|
case R.id.track_detail_edit:
|
||||||
intent = IntentUtils.newIntent(this, TrackEditActivity.class)
|
intent = IntentUtils.newIntent(this, TrackEditActivity.class)
|
||||||
|
|||||||
+9
-17
@@ -79,14 +79,8 @@ public class ExportDialogFragment extends AbstractMyTracksDialogFragment {
|
|||||||
|
|
||||||
public static final String EXPORT_DIALOG_TAG = "export";
|
public static final String EXPORT_DIALOG_TAG = "export";
|
||||||
|
|
||||||
public static ExportDialogFragment newInstance(boolean hideDrive) {
|
|
||||||
//TODO REMOVE
|
|
||||||
return new ExportDialogFragment();
|
|
||||||
}
|
|
||||||
|
|
||||||
private ExportCaller caller;
|
private ExportCaller caller;
|
||||||
private ArrayList<ExportType> exportTypeOptionsList;
|
|
||||||
|
|
||||||
// UI elements
|
// UI elements
|
||||||
private Spinner exportTypeOptions;
|
private Spinner exportTypeOptions;
|
||||||
private RadioGroup exportExternalStorageOptions;
|
private RadioGroup exportExternalStorageOptions;
|
||||||
@@ -108,7 +102,8 @@ public class ExportDialogFragment extends AbstractMyTracksDialogFragment {
|
|||||||
|
|
||||||
// Get views
|
// Get views
|
||||||
View view = fragmentActivity.getLayoutInflater().inflate(R.layout.export, null);
|
View view = fragmentActivity.getLayoutInflater().inflate(R.layout.export, null);
|
||||||
exportTypeOptions = (Spinner) view.findViewById(R.id.export_type_options);
|
exportExternalStorageOptions = (RadioGroup) view.findViewById(
|
||||||
|
R.id.export_external_storage_options);
|
||||||
|
|
||||||
// Setup exportExternalStorageOptions
|
// Setup exportExternalStorageOptions
|
||||||
setExternalStorageOption(
|
setExternalStorageOption(
|
||||||
@@ -122,6 +117,7 @@ public class ExportDialogFragment extends AbstractMyTracksDialogFragment {
|
|||||||
TrackFileFormat trackFileFormat = TrackFileFormat.valueOf(PreferencesUtils.getString(
|
TrackFileFormat trackFileFormat = TrackFileFormat.valueOf(PreferencesUtils.getString(
|
||||||
fragmentActivity, R.string.export_external_storage_format_key,
|
fragmentActivity, R.string.export_external_storage_format_key,
|
||||||
PreferencesUtils.EXPORT_EXTERNAL_STORAGE_FORMAT_DEFAULT));
|
PreferencesUtils.EXPORT_EXTERNAL_STORAGE_FORMAT_DEFAULT));
|
||||||
|
|
||||||
exportExternalStorageOptions.check(getExternalStorageFormatId(trackFileFormat));
|
exportExternalStorageOptions.check(getExternalStorageFormatId(trackFileFormat));
|
||||||
|
|
||||||
return new AlertDialog.Builder(fragmentActivity)
|
return new AlertDialog.Builder(fragmentActivity)
|
||||||
@@ -130,17 +126,13 @@ public class ExportDialogFragment extends AbstractMyTracksDialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
FragmentActivity context = getActivity();
|
FragmentActivity context = getActivity();
|
||||||
ExportType type = exportTypeOptionsList.get(
|
|
||||||
exportTypeOptions.getSelectedItemPosition());
|
|
||||||
TrackFileFormat format = null;
|
TrackFileFormat format = null;
|
||||||
|
|
||||||
PreferencesUtils.setString(context, R.string.export_type_key, type.name());
|
PreferencesUtils.setString(context, R.string.export_type_key, ExportType.EXTERNAL_STORAGE.name());
|
||||||
if (type == ExportType.EXTERNAL_STORAGE) {
|
|
||||||
format = getTrackFileFormat(exportExternalStorageOptions.getCheckedRadioButtonId());
|
format = getTrackFileFormat(exportExternalStorageOptions.getCheckedRadioButtonId());
|
||||||
PreferencesUtils.setString(
|
PreferencesUtils.setString(context, R.string.export_external_storage_format_key, format.name());
|
||||||
context, R.string.export_external_storage_format_key, format.name());
|
caller.onExportDone(ExportType.EXTERNAL_STORAGE, format);
|
||||||
}
|
|
||||||
caller.onExportDone(type, format);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.setTitle(R.string.export_title).setView(view).create();
|
.setTitle(R.string.export_title).setView(view).create();
|
||||||
|
|||||||
@@ -21,34 +21,6 @@ limitations under the License.
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="8dp" >
|
android:padding="8dp" >
|
||||||
<Spinner
|
|
||||||
android:id="@+id/export_type_options"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="match_parent" />
|
|
||||||
<RadioGroup
|
|
||||||
android:id="@+id/export_google_maps_options"
|
|
||||||
style="@style/ExportRadioGroup" >
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/export_google_maps_public"
|
|
||||||
android:text="@string/export_google_maps_public"
|
|
||||||
style="@style/TextMedium" />
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/export_google_maps_unlisted"
|
|
||||||
android:text="@string/export_google_maps_unlisted"
|
|
||||||
style="@style/TextMedium" />
|
|
||||||
</RadioGroup>
|
|
||||||
<RadioGroup
|
|
||||||
android:id="@+id/export_google_fusion_tables_options"
|
|
||||||
style="@style/ExportRadioGroup" >
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/export_google_fusion_tables_public"
|
|
||||||
android:text="@string/export_google_fusion_tables_public"
|
|
||||||
style="@style/TextMedium" />
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/export_google_fusion_tables_private"
|
|
||||||
android:text="@string/export_google_fusion_tables_private"
|
|
||||||
style="@style/TextMedium" />
|
|
||||||
</RadioGroup>
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/export_external_storage_options"
|
android:id="@+id/export_external_storage_options"
|
||||||
style="@style/ExportRadioGroup" >
|
style="@style/ExportRadioGroup" >
|
||||||
@@ -65,10 +37,5 @@ limitations under the License.
|
|||||||
android:id="@+id/export_external_storage_tcx"
|
android:id="@+id/export_external_storage_tcx"
|
||||||
style="@style/TextMedium" />
|
style="@style/TextMedium" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
<Spinner
|
|
||||||
android:id="@+id/export_account"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:layout_width="wrap_content" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
Reference in New Issue
Block a user