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:
|
||||
Track track = myTracksProviderUtils.getTrack(trackId);
|
||||
boolean hideDrive = track != null ? track.isSharedWithMe() : true;
|
||||
ExportDialogFragment.newInstance(hideDrive)
|
||||
.show(getSupportFragmentManager(), ExportDialogFragment.EXPORT_DIALOG_TAG);
|
||||
new ExportDialogFragment().show(getSupportFragmentManager(), ExportDialogFragment.EXPORT_DIALOG_TAG);
|
||||
return true;
|
||||
case R.id.track_detail_edit:
|
||||
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 ExportDialogFragment newInstance(boolean hideDrive) {
|
||||
//TODO REMOVE
|
||||
return new ExportDialogFragment();
|
||||
}
|
||||
|
||||
private ExportCaller caller;
|
||||
private ArrayList<ExportType> exportTypeOptionsList;
|
||||
|
||||
|
||||
// UI elements
|
||||
private Spinner exportTypeOptions;
|
||||
private RadioGroup exportExternalStorageOptions;
|
||||
@@ -108,7 +102,8 @@ public class ExportDialogFragment extends AbstractMyTracksDialogFragment {
|
||||
|
||||
// Get views
|
||||
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
|
||||
setExternalStorageOption(
|
||||
@@ -122,6 +117,7 @@ public class ExportDialogFragment extends AbstractMyTracksDialogFragment {
|
||||
TrackFileFormat trackFileFormat = TrackFileFormat.valueOf(PreferencesUtils.getString(
|
||||
fragmentActivity, R.string.export_external_storage_format_key,
|
||||
PreferencesUtils.EXPORT_EXTERNAL_STORAGE_FORMAT_DEFAULT));
|
||||
|
||||
exportExternalStorageOptions.check(getExternalStorageFormatId(trackFileFormat));
|
||||
|
||||
return new AlertDialog.Builder(fragmentActivity)
|
||||
@@ -130,17 +126,13 @@ public class ExportDialogFragment extends AbstractMyTracksDialogFragment {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
FragmentActivity context = getActivity();
|
||||
ExportType type = exportTypeOptionsList.get(
|
||||
exportTypeOptions.getSelectedItemPosition());
|
||||
TrackFileFormat format = null;
|
||||
|
||||
PreferencesUtils.setString(context, R.string.export_type_key, type.name());
|
||||
if (type == ExportType.EXTERNAL_STORAGE) {
|
||||
format = getTrackFileFormat(exportExternalStorageOptions.getCheckedRadioButtonId());
|
||||
PreferencesUtils.setString(
|
||||
context, R.string.export_external_storage_format_key, format.name());
|
||||
}
|
||||
caller.onExportDone(type, format);
|
||||
PreferencesUtils.setString(context, R.string.export_type_key, ExportType.EXTERNAL_STORAGE.name());
|
||||
|
||||
format = getTrackFileFormat(exportExternalStorageOptions.getCheckedRadioButtonId());
|
||||
PreferencesUtils.setString(context, R.string.export_external_storage_format_key, format.name());
|
||||
caller.onExportDone(ExportType.EXTERNAL_STORAGE, format);
|
||||
}
|
||||
})
|
||||
.setTitle(R.string.export_title).setView(view).create();
|
||||
|
||||
@@ -21,34 +21,6 @@ limitations under the License.
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="vertical"
|
||||
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
|
||||
android:id="@+id/export_external_storage_options"
|
||||
style="@style/ExportRadioGroup" >
|
||||
@@ -65,10 +37,5 @@ limitations under the License.
|
||||
android:id="@+id/export_external_storage_tcx"
|
||||
style="@style/TextMedium" />
|
||||
</RadioGroup>
|
||||
<Spinner
|
||||
android:id="@+id/export_account"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_width="wrap_content" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
Reference in New Issue
Block a user