Merge pull request #8166 from osmandapp/FixTextColor

Fix "Map style" bottom sheet item text color
This commit is contained in:
max-klaus 2020-01-02 16:07:10 +03:00 committed by GitHub
commit 9e5cbc8b04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,12 +2,10 @@ package net.osmand.plus.dialogs;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.res.ColorStateList;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.ColorInt; import android.support.annotation.ColorInt;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v4.widget.CompoundButtonCompat;
import android.support.v4.widget.NestedScrollView; import android.support.v4.widget.NestedScrollView;
import android.view.ContextThemeWrapper; import android.view.ContextThemeWrapper;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -18,7 +16,6 @@ import android.widget.RadioButton;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import net.osmand.AndroidUtils;
import net.osmand.Collator; import net.osmand.Collator;
import net.osmand.OsmAndCollator; import net.osmand.OsmAndCollator;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
@ -222,7 +219,7 @@ public class SelectMapStyleBottomSheetDialogFragment extends MenuBottomSheetDial
@ColorInt @ColorInt
private int getStyleTitleColor(boolean selected) { private int getStyleTitleColor(boolean selected) {
int colorId = selected int colorId = selected
? getMyApplication() != null ? getMyApplication().getSettings().APPLICATION_MODE.get().getIconColorInfo().getColor(nightMode) : getActiveColorId() ? getActiveColorId()
: nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light; : nightMode ? R.color.text_color_primary_dark : R.color.text_color_primary_light;
return getResolvedColor(colorId); return getResolvedColor(colorId);
} }