From 77e316f8e66d3f0fcf8d6a5591a9dd98b21134f1 Mon Sep 17 00:00:00 2001 From: max-klaus Date: Sat, 15 Feb 2020 19:26:13 +0300 Subject: [PATCH] Added default widget action item to av settings fragment --- OsmAnd/res/xml/multimedia_notes.xml | 7 +++++ .../audionotes/MultimediaNotesFragment.java | 29 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/OsmAnd/res/xml/multimedia_notes.xml b/OsmAnd/res/xml/multimedia_notes.xml index 017768ef4d..a3c8569758 100644 --- a/OsmAnd/res/xml/multimedia_notes.xml +++ b/OsmAnd/res/xml/multimedia_notes.xml @@ -3,6 +3,13 @@ xmlns:tools="http://schemas.android.com/tools" android:title="@string/audionotes_plugin_name"> + + items = new ArrayList(); + List itemsValues = new ArrayList(); + items.add(getString(R.string.av_def_action_choose)); + itemsValues.add(AV_DEFAULT_ACTION_CHOOSE); + items.add(getString(R.string.av_def_action_audio)); + itemsValues.add(AV_DEFAULT_ACTION_AUDIO); + items.add(getString(R.string.av_def_action_video)); + itemsValues.add(AV_DEFAULT_ACTION_VIDEO); + items.add(getString(R.string.av_def_action_picture)); + itemsValues.add(AV_DEFAULT_ACTION_TAKEPICTURE); + + String[] entries = items.toArray(new String[0]); + Integer[] entryValues = itemsValues.toArray(new Integer[0]); + + defaultWidgetActions.setEntries(entries); + defaultWidgetActions.setEntryValues(entryValues); + } + private void setupCameraPhotoPrefs(AudioVideoNotesPlugin plugin) { Camera cam = openCamera(); setupCameraPermissionPref(cam);