From 5b89e876874278f59d3e0270d090e57492908992 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 29 Mar 2020 14:13:21 +0200 Subject: [PATCH 1/7] Voice Prompt Delay for all modes (#8706) --- .../src/net/osmand/plus/OsmandSettings.java | 10 +++++- .../plus/development/TestVoiceActivity.java | 32 +++++++++---------- .../net/osmand/plus/routing/VoiceRouter.java | 15 +++++---- .../voice/AbstractPrologCommandPlayer.java | 3 -- .../plus/voice/JSMediaCommandPlayerImpl.java | 14 ++++---- .../plus/voice/MediaCommandPlayerImpl.java | 14 ++++---- .../plus/voice/TTSCommandPlayerImpl.java | 19 ++++++----- 7 files changed, 59 insertions(+), 48 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 85c93e31f4..39e781ed76 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -2090,7 +2090,15 @@ public class OsmandSettings { 12/*AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE*/).makeProfile(); // For now this can be changed only in TestVoiceActivity - public final OsmandPreference BT_SCO_DELAY = new IntPreference("bt_sco_delay", 1500).makeGlobal().cache(); + public final OsmandPreference[] VOICE_PROMPT_DELAY = new IntPreference[5]; + + { + // On most devices sound output works pomptly so usually no voice prompt delay needed + VOICE_PROMPT_DELAY[3] = new IntPreference("voice_prompt_delay_3", 0).makeGlobal().cache(); /*AudioManager.STREAM_MUSIC*/ + VOICE_PROMPT_DELAY[5] = new IntPreference("voice_prompt_delay_5", 0).makeGlobal().cache(); /*AudioManager.STREAM_NOTIFICATION*/ + // 1500 ms delay works for most configurations to establish a BT SCO link + VOICE_PROMPT_DELAY[0] = new IntPreference("voice_prompt_delay_0", 1500).makeGlobal().cache(); /*AudioManager.STREAM_VOICE_CALL*/ + } // this value string is synchronized with settings_pref.xml preference name public final CommonPreference MAP_ONLINE_DATA = new BooleanPreference("map_online_data", false).makeProfile(); diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index 90acf2e9fa..f6bce308a0 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -147,7 +147,8 @@ public class TestVoiceActivity extends OsmandActionBarActivity { v += "\n \u25CF BT SCO: The current app profile is not set to use 'Phone call audio'."; } - v += "\n \u25CF Phone call audio delay: " + ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() + "\u00A0ms"; + v += "\n \u25CF Voice prompt delay for selected output: " + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY + [((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get()].get() + "\u00A0ms"; return v; } @@ -230,7 +231,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity { addButton(ll, "Voice system info:", builder(p)); addButton(ll, "\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo(), builder(p).attention("")); - addButton(ll, "\u25BA (11.2) Tap to change Phone call audio delay (if car stereo cuts off prompts). Default is 1500\u00A0ms.", builder(p).attention("")); + addButton(ll, "\u25BA (11.2) Tap to change voice prompt delay (if car stereo cuts off prompts). Default is 1500\u00A0ms for Phone call audio, or else 0\u00A0ms.", builder(p).attention("")); ll.forceLayout(); } @@ -282,23 +283,20 @@ public class TestVoiceActivity extends OsmandActionBarActivity { Toast.makeText(TestVoiceActivity.this, "Info refreshed.", Toast.LENGTH_LONG).show(); } if (description.startsWith("\u25BA (11.2)")) { - if (((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get() == 0) { - if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 1000) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(1500); - } else if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 1500) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(2000); - } else if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 2000) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(2500); - } else if (((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() == 2500) { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(3000); - } else { - ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.set(1000); - } - infoButton.setText("\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo()); - Toast.makeText(TestVoiceActivity.this, "BT SCO init delay changed to " + ((OsmandApplication) getApplication()).getSettings().BT_SCO_DELAY.get() + "\u00A0ms.", Toast.LENGTH_LONG).show(); + int ams = ((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get(); + if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1000) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1500); + } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1500) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2000); + } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2000) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2500); + } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2500) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(3000); } else { - Toast.makeText(TestVoiceActivity.this, "Setting only available when using 'Phone call audio'.", Toast.LENGTH_LONG).show(); + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1000); } + infoButton.setText("\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo()); + Toast.makeText(TestVoiceActivity.this, "Voice prompt delay changed to " + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() + "\u00A0ms.", Toast.LENGTH_LONG).show(); } } }); diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index 0b34ec6a1d..1f5d0e7ebe 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -192,7 +192,7 @@ public class VoiceRouter { } } - private double btScoDelayDistance = 0; + private double voicePromptDelayDistance = 0; public boolean isDistanceLess(float currentSpeed, double dist, double etalon, float defSpeed) { if (defSpeed <= 0) { @@ -202,12 +202,13 @@ public class VoiceRouter { currentSpeed = DEFAULT_SPEED; } - // Trigger close prompts earlier if delayed for BT SCO connection establishment - if ((settings.AUDIO_MANAGER_STREAM.getModeValue(router.getAppMode()) == 0) && !AbstractPrologCommandPlayer.btScoStatus) { - btScoDelayDistance = currentSpeed * (double) settings.BT_SCO_DELAY.get() / 1000; + // Trigger close prompts earlier to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + int ams = settings.AUDIO_MANAGER_STREAM.getModeValue(router.getAppMode()); + if (((ams == 0) && !AbstractPrologCommandPlayer.btScoStatus) || (ams > 0)) { + voicePromptDelayDistance = currentSpeed * (double) settings.VOICE_PROMPT_DELAY[ams].get() / 1000; } - if ((dist < etalon + btScoDelayDistance) || ((dist - btScoDelayDistance) / currentSpeed) < (etalon / defSpeed)) { + if ((dist < etalon + voicePromptDelayDistance) || ((dist - voicePromptDelayDistance) / currentSpeed) < (etalon / defSpeed)) { return true; } return false; @@ -520,9 +521,9 @@ public class VoiceRouter { if (repeat || dist >= TURN_IN_DISTANCE_END) { if ((isDistanceLess(speed, nextNextInfo.distanceTo, TURN_DISTANCE, 0f) || nextNextInfo.distanceTo < TURN_IN_DISTANCE_END) && nextNextInfo != null) { - playMakeTurnIn(currentSegment, next, dist - (int) btScoDelayDistance, nextNextInfo.directionInfo); + playMakeTurnIn(currentSegment, next, dist - (int) voicePromptDelayDistance, nextNextInfo.directionInfo); } else { - playMakeTurnIn(currentSegment, next, dist - (int) btScoDelayDistance, null); + playMakeTurnIn(currentSegment, next, dist - (int) voicePromptDelayDistance, null); } playGoAndArriveAtDestination(repeat, nextInfo, currentSegment); } diff --git a/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java b/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java index a645fc8c9d..04449bf62b 100644 --- a/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java +++ b/OsmAnd/src/net/osmand/plus/voice/AbstractPrologCommandPlayer.java @@ -322,9 +322,6 @@ public abstract class AbstractPrologCommandPlayer implements CommandPlayer, Stat public static boolean btScoStatus = false; - // BT_SCO_DELAY now in Settings. 1500 ms works for most configurations. - //public static final int BT_SCO_DELAY = 1500; - // This only needed for init debugging in TestVoiceActivity: public static String btScoInit = "-"; diff --git a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java index c22973427a..cd4511724e 100644 --- a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java @@ -55,12 +55,14 @@ public class JSMediaCommandPlayerImpl extends MediaCommandPlayerImpl { // If we have not already started to play audio, start. if (mediaPlayer == null) { requestAudioFocus(); - // Delay first prompt of each batch to allow BT SCO connection being established - if (ctx != null && ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode()) == 0) { - try { - log.debug("Delaying MediaCommandPlayer for BT SCO"); - Thread.sleep(ctx.getSettings().BT_SCO_DELAY.get()); - } catch (InterruptedException e) { + // Delay first prompt of each batch to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + if (ctx != null) { + int vpd = ctx.getSettings().VOICE_PROMPT_DELAY[ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode())].get(); + if (vpd > 0) { + try { + Thread.sleep(vpd); + } catch (InterruptedException e) { + } } } } diff --git a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java index 8c5b454ddd..273bfe7ccc 100644 --- a/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/MediaCommandPlayerImpl.java @@ -87,12 +87,14 @@ public class MediaCommandPlayerImpl extends AbstractPrologCommandPlayer implemen // If we have not already started to play audio, start. if (mediaPlayer == null) { requestAudioFocus(); - // Delay first prompt of each batch to allow BT SCO connection being established - if (ctx != null && ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode()) == 0) { - try { - log.debug("Delaying MediaCommandPlayer for BT SCO"); - Thread.sleep(ctx.getSettings().BT_SCO_DELAY.get()); - } catch (InterruptedException e) { + // Delay first prompt of each batch to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + if (ctx != null) { + int vpd = ctx.getSettings().VOICE_PROMPT_DELAY[ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode())].get(); + if (vpd > 0) { + try { + Thread.sleep(vpd); + } catch (InterruptedException e) { + } } } } diff --git a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java index 7bb19f361b..ad81dbef28 100644 --- a/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/TTSCommandPlayerImpl.java @@ -123,14 +123,17 @@ public class TTSCommandPlayerImpl extends AbstractPrologCommandPlayer { .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH) .build()); } - // Delay first prompt of each batch to allow BT SCO connection being established - if (ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode()) == 0) { - ttsRequests++; - if (android.os.Build.VERSION.SDK_INT < 21) { - params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID,""+System.currentTimeMillis()); - mTts.playSilence(ctx.getSettings().BT_SCO_DELAY.get(), TextToSpeech.QUEUE_ADD, params); - } else { - mTts.playSilentUtterance(ctx.getSettings().BT_SCO_DELAY.get(), TextToSpeech.QUEUE_ADD, ""+System.currentTimeMillis()); + // Delay first prompt of each batch to allow BT SCO link being established, or when VOICE_PROMPT_DELAY is set >0 for the other stream types + if (ctx != null) { + int vpd = ctx.getSettings().VOICE_PROMPT_DELAY[ctx.getSettings().AUDIO_MANAGER_STREAM.getModeValue(getApplicationMode())].get(); + if (vpd > 0) { + ttsRequests++; + if (android.os.Build.VERSION.SDK_INT < 21) { + params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID,""+System.currentTimeMillis()); + mTts.playSilence(vpd, TextToSpeech.QUEUE_ADD, params); + } else { + mTts.playSilentUtterance(vpd, TextToSpeech.QUEUE_ADD, ""+System.currentTimeMillis()); + } } } } From 7c01f664ca9d8a0f385e7490683636cc47de8105 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 29 Mar 2020 14:29:46 +0200 Subject: [PATCH 2/7] fix array length --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 39e781ed76..b741f9155c 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -2090,7 +2090,7 @@ public class OsmandSettings { 12/*AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE*/).makeProfile(); // For now this can be changed only in TestVoiceActivity - public final OsmandPreference[] VOICE_PROMPT_DELAY = new IntPreference[5]; + public final OsmandPreference[] VOICE_PROMPT_DELAY = new IntPreference[6]; { // On most devices sound output works pomptly so usually no voice prompt delay needed From d37699988e3df1e5a9e4c2efba26a466ac09646d Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 29 Mar 2020 15:15:56 +0200 Subject: [PATCH 3/7] Facilitate range 0-3000ms --- .../osmand/plus/development/TestVoiceActivity.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index f6bce308a0..8864807e9b 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -284,16 +284,11 @@ public class TestVoiceActivity extends OsmandActionBarActivity { } if (description.startsWith("\u25BA (11.2)")) { int ams = ((OsmandApplication) getApplication()).getSettings().AUDIO_MANAGER_STREAM.get(); - if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1000) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1500); - } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 1500) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2000); - } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2000) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(2500); - } else if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() == 2500) { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(3000); + if (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() >= 3000) { + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(0); } else { - ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set(1000); + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].set + (((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() + 500); } infoButton.setText("\u25BA (11.1) (Tap to refresh)\n" + getVoiceSystemInfo()); Toast.makeText(TestVoiceActivity.this, "Voice prompt delay changed to " + ((OsmandApplication) getApplication()).getSettings().VOICE_PROMPT_DELAY[ams].get() + "\u00A0ms.", Toast.LENGTH_LONG).show(); From bdaadda18dc44ae38c5c26c7a9d40e152d643794 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Thu, 9 Apr 2020 19:31:49 +0300 Subject: [PATCH 4/7] Fix base profile name scroll appearance --- OsmAnd/res/layout/preference_dropdown_list.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/layout/preference_dropdown_list.xml b/OsmAnd/res/layout/preference_dropdown_list.xml index 78e57317f9..391c25d08a 100644 --- a/OsmAnd/res/layout/preference_dropdown_list.xml +++ b/OsmAnd/res/layout/preference_dropdown_list.xml @@ -29,7 +29,8 @@ @@ -40,6 +41,7 @@ android:layout_height="wrap_content" android:focusable="false" android:maxLines="1" + android:scrollbars="none" tools:text="Car" /> From 1e3056cc4acc77e94afb8d7956f05cd5ab1db504 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Fri, 10 Apr 2020 11:29:19 +0300 Subject: [PATCH 5/7] fix icon margin / checkBox unselected color --- .../plus/settings/ExportImportSettingsAdapter.java | 10 ++++++++-- .../plus/settings/ImportedSettingsItemsAdapter.java | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java index c90b9cb990..509fb394b7 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/ExportImportSettingsAdapter.java @@ -55,6 +55,7 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { private boolean nightMode; private boolean importState; private int activeColorRes; + private int secondaryColorRes; ExportImportSettingsAdapter(OsmandApplication app, boolean nightMode, boolean importState) { this.app = app; @@ -68,6 +69,9 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { activeColorRes = nightMode ? R.color.icon_color_active_dark : R.color.icon_color_active_light; + secondaryColorRes = nightMode + ? R.color.icon_color_secondary_dark + : R.color.icon_color_secondary_light; } @Override @@ -94,7 +98,6 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { lineDivider.setVisibility(importState || isExpanded || isLastGroup ? View.GONE : View.VISIBLE); cardTopDivider.setVisibility(importState ? View.VISIBLE : View.GONE); cardBottomDivider.setVisibility(importState && !isExpanded ? View.VISIBLE : View.GONE); - CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, activeColorRes))); final List listItems = itemsMap.get(type); subTextTv.setText(getSelectedItemsAmount(listItems)); @@ -111,6 +114,8 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { } checkBox.setState(contains ? MISC : UNCHECKED); } + int checkBoxColor = checkBox.getState() == UNCHECKED ? secondaryColorRes : activeColorRes; + CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, checkBoxColor))); checkBoxContainer.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -153,7 +158,8 @@ class ExportImportSettingsAdapter extends OsmandBaseExpandableListAdapter { lineDivider.setVisibility(!importState && isLastChild && !isLastGroup ? View.VISIBLE : View.GONE); cardBottomDivider.setVisibility(importState && isLastChild ? View.VISIBLE : View.GONE); - CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, activeColorRes))); + int checkBoxColor = itemSelected ? activeColorRes : secondaryColorRes; + CompoundButtonCompat.setButtonTintList(checkBox, ColorStateList.valueOf(ContextCompat.getColor(app, checkBoxColor))); checkBox.setChecked(itemSelected); checkBox.setClickable(false); diff --git a/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java b/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java index 3dd0e4102c..dcb86fa87c 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java +++ b/OsmAnd/src/net/osmand/plus/settings/ImportedSettingsItemsAdapter.java @@ -60,7 +60,6 @@ public class ImportedSettingsItemsAdapter extends ? R.color.active_color_primary_dark : R.color.active_color_primary_light; - holder.icon.setPadding(0, 0, AndroidUtils.dpToPx(app, 16), 0); holder.title.setTextColor(app.getResources().getColor(activeColorRes)); Typeface typeface = FontCache.getFont(app, app.getString(R.string.font_roboto_medium)); if (typeface != null) { From 9655500ea998d66d3b61dfdb9f67e376e5960b9e Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Fri, 10 Apr 2020 12:54:57 +0300 Subject: [PATCH 6/7] slope/hillshade fixes --- OsmAnd/res/drawable/btn_bg_border_inactive.xml | 2 +- OsmAnd/res/values/attrs.xml | 1 + OsmAnd/res/values/styles.xml | 2 ++ OsmAnd/src/net/osmand/plus/srtmplugin/SRTMPlugin.java | 4 ++++ OsmAnd/src/net/osmand/plus/srtmplugin/TerrainFragment.java | 6 +++--- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/drawable/btn_bg_border_inactive.xml b/OsmAnd/res/drawable/btn_bg_border_inactive.xml index 844747ac35..dcf60ef7ed 100644 --- a/OsmAnd/res/drawable/btn_bg_border_inactive.xml +++ b/OsmAnd/res/drawable/btn_bg_border_inactive.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/OsmAnd/res/values/attrs.xml b/OsmAnd/res/values/attrs.xml index 750eb1993a..048cd83aca 100644 --- a/OsmAnd/res/values/attrs.xml +++ b/OsmAnd/res/values/attrs.xml @@ -34,6 +34,7 @@ + diff --git a/OsmAnd/res/values/styles.xml b/OsmAnd/res/values/styles.xml index cea274876b..8fea939e8f 100644 --- a/OsmAnd/res/values/styles.xml +++ b/OsmAnd/res/values/styles.xml @@ -277,6 +277,7 @@ @color/list_background_color_light @color/list_background_color_light @style/OsmandPreferenceTheme + @color/stroked_buttons_and_links_outline_light