Search in sources :

Example 1 with DashOsmEditsFragment

use of net.osmand.plus.plugins.osmedit.fragments.DashOsmEditsFragment in project Osmand by osmandapp.

the class SendOsmNoteBottomSheetFragment method onRightBottomButtonClick.

@Override
protected void onRightBottomButtonClick() {
    ProgressDialogPoiUploader progressDialogPoiUploader = null;
    Activity activity = getActivity();
    if (activity instanceof MapActivity) {
        if (getParentFragment() instanceof DashOsmEditsFragment) {
            progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment();
        } else {
            progressDialogPoiUploader = new SimpleProgressDialogPoiUploader((MapActivity) activity);
        }
    } else if (getParentFragment() instanceof ProgressDialogPoiUploader) {
        progressDialogPoiUploader = (ProgressDialogPoiUploader) getParentFragment();
    }
    if (progressDialogPoiUploader != null) {
        ((OsmNotesPoint) poi[0]).setText(noteText.getText().toString());
        progressDialogPoiUploader.showProgressDialog(poi, false, uploadAnonymously.isChecked());
    }
    dismiss();
}
Also used : OsmNotesPoint(net.osmand.plus.plugins.osmedit.data.OsmNotesPoint) FragmentActivity(androidx.fragment.app.FragmentActivity) Activity(android.app.Activity) MapActivity(net.osmand.plus.activities.MapActivity) DashOsmEditsFragment(net.osmand.plus.plugins.osmedit.fragments.DashOsmEditsFragment) MapActivity(net.osmand.plus.activities.MapActivity)

Aggregations

Activity (android.app.Activity)1 FragmentActivity (androidx.fragment.app.FragmentActivity)1 MapActivity (net.osmand.plus.activities.MapActivity)1 OsmNotesPoint (net.osmand.plus.plugins.osmedit.data.OsmNotesPoint)1 DashOsmEditsFragment (net.osmand.plus.plugins.osmedit.fragments.DashOsmEditsFragment)1