Made improvements in Measure Distance and changed colors of RenameMarkerBottomDialogFragment
This commit is contained in:
parent
60b7859f6a
commit
53a0f26103
4 changed files with 9 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<color name="switch_track_color_measure_instruments">#c5d2e6</color>
|
||||
<color name="map_toolbar_switch_track_color">#c5d2e6</color>
|
||||
<color name="mapillary_color">#3db878</color>
|
||||
<color name="mapillary_color_pressed">#3a9f73</color>
|
||||
<color name="mapillary_action_bar">#14c45d</color>
|
||||
|
|
|
@ -95,9 +95,9 @@
|
|||
<style name="OsmandLightThemeWithLightStatusBar" parent="OsmandLightTheme">
|
||||
<item name="android:statusBarColor">@color/status_bar_route_light</item>
|
||||
</style>
|
||||
<style name="OsmandDarkTheme.MarkerFragment" >
|
||||
<item name="android:textColorPrimary">@color/primary_text_field_boxes_color</item>
|
||||
<item name="android:textColor">@color/primary_text_field_boxes_color</item>
|
||||
|
||||
<style name="Widget.Styled.DarkActionBarTitle" parent="TextAppearance.AppCompat.Widget.ActionBar.Title">
|
||||
<item name="android:textColor">@color/color_dialog_buttons_dark</item>
|
||||
</style>
|
||||
|
||||
<!-- Osmand themes styles -->
|
||||
|
|
|
@ -62,7 +62,7 @@ public class RenameMarkerBottomSheetDialogFragment extends BottomSheetDialogFrag
|
|||
if (nightMode) {
|
||||
nameEditText.setTextColor(ContextCompat.getColor(mapActivity, R.color.color_white));
|
||||
if (textBox instanceof TextInputLayout) {
|
||||
((TextInputLayout) textBox).setHintTextAppearance(R.style.OsmandDarkTheme_MarkerFragment);
|
||||
((TextInputLayout) textBox).setHintTextAppearance(R.style.Widget_Styled_DarkActionBarTitle);
|
||||
} else if (textBox instanceof OsmandTextFieldBoxes) {
|
||||
((OsmandTextFieldBoxes) textBox).activate(true);
|
||||
((OsmandTextFieldBoxes) textBox).setPrimaryColor(ContextCompat.getColor(mapActivity,R.color.color_dialog_buttons_dark));
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.osmand.plus.views.mapwidgets;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.graphics.drawable.DrawableCompat;
|
||||
import android.support.v7.widget.SwitchCompat;
|
||||
import android.view.View;
|
||||
|
@ -418,7 +419,9 @@ public class MapInfoWidgetsFactory {
|
|||
view.updateVisibility(switchCompat, topBarSwitchVisible);
|
||||
if (topBarSwitchVisible) {
|
||||
switchCompat.setChecked(topBarSwitchChecked);
|
||||
view.setTopBarSwitchTrackColor(switchCompat, topBarSwitchChecked);
|
||||
if (topBarSwitchChecked) {
|
||||
DrawableCompat.setTint(switchCompat.getTrackDrawable(), ContextCompat.getColor(switchCompat.getContext(),R.color.map_toolbar_switch_track_color));
|
||||
}
|
||||
}
|
||||
if (view.getShadowView() != null) {
|
||||
view.getShadowView().setVisibility(View.VISIBLE);
|
||||
|
@ -568,13 +571,6 @@ public class MapInfoWidgetsFactory {
|
|||
return false;
|
||||
}
|
||||
|
||||
public void setTopBarSwitchTrackColor(View v, boolean active) {
|
||||
SwitchCompat switchCompat = (SwitchCompat) v;
|
||||
if (active) {
|
||||
DrawableCompat.setTint(switchCompat.getTrackDrawable(), map.getResources().getColor(R.color.switch_track_color_measure_instruments));
|
||||
}
|
||||
}
|
||||
|
||||
private void initToolbar(TopToolbarController controller) {
|
||||
backButton.setOnClickListener(controller.onBackButtonClickListener);
|
||||
topBarTitleLayout.setOnClickListener(controller.onTitleClickListener);
|
||||
|
|
Loading…
Reference in a new issue