Removed bold for categories and added light sensor icon.
This commit is contained in:
parent
08e3f7c989
commit
599294f948
2 changed files with 16 additions and 14 deletions
|
@ -1,7 +1,6 @@
|
|||
package net.osmand.plus;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.IdRes;
|
||||
|
@ -133,14 +132,7 @@ public class ContextMenuAdapter {
|
|||
convertView.setTag(layoutId);
|
||||
}
|
||||
TextView tv = (TextView) convertView.findViewById(R.id.title);
|
||||
|
||||
if (item.isCategory()) {
|
||||
tv.setTypeface(Typeface.DEFAULT_BOLD);
|
||||
} else {
|
||||
AndroidUtils.setTextPrimaryColor(getContext(), tv, !holoLight);
|
||||
tv.setTypeface(null);
|
||||
}
|
||||
tv.setText(item.isCategory() ? item.getTitle().toUpperCase() : item.getTitle());
|
||||
tv.setText(item.getTitle());
|
||||
|
||||
if (this.layoutId == R.layout.simple_list_menu_item) {
|
||||
int color = ContextCompat.getColor(getContext(),
|
||||
|
|
|
@ -11,7 +11,9 @@ import android.net.ConnectivityManager;
|
|||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.support.annotation.DrawableRes;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.StringRes;
|
||||
|
||||
import net.osmand.IndexConstants;
|
||||
import net.osmand.StateChangedListener;
|
||||
|
@ -2526,21 +2528,29 @@ public class OsmandSettings {
|
|||
|
||||
|
||||
public enum DayNightMode {
|
||||
AUTO(R.string.daynight_mode_auto),
|
||||
DAY(R.string.daynight_mode_day),
|
||||
NIGHT(R.string.daynight_mode_night),
|
||||
SENSOR(R.string.daynight_mode_sensor);
|
||||
AUTO(R.string.daynight_mode_auto, R.drawable.ic_action_map_sunst),
|
||||
DAY(R.string.daynight_mode_day, R.drawable.ic_action_map_day),
|
||||
NIGHT(R.string.daynight_mode_night, R.drawable.ic_action_map_night),
|
||||
SENSOR(R.string.daynight_mode_sensor, R.drawable.ic_action_map_light_sensor);
|
||||
|
||||
private final int key;
|
||||
@DrawableRes
|
||||
private final int drawableRes;
|
||||
|
||||
DayNightMode(int key) {
|
||||
DayNightMode(@StringRes int key, @DrawableRes int drawableRes) {
|
||||
this.key = key;
|
||||
this.drawableRes = drawableRes;
|
||||
}
|
||||
|
||||
public String toHumanString(Context ctx) {
|
||||
return ctx.getString(key);
|
||||
}
|
||||
|
||||
@DrawableRes
|
||||
public int getIconRes() {
|
||||
return drawableRes;
|
||||
}
|
||||
|
||||
public boolean isSensor() {
|
||||
return this == SENSOR;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue