Updated styles for android 2.3.3
This commit is contained in:
parent
134cea1b80
commit
6ef9a76f27
8 changed files with 11 additions and 40 deletions
|
@ -46,6 +46,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:choiceMode="singleChoice"
|
android:choiceMode="singleChoice"
|
||||||
|
android:background="?attr/expandable_list_background"
|
||||||
android:divider="@drawable/divider"
|
android:divider="@drawable/divider"
|
||||||
android:dividerHeight="1dp" />
|
android:dividerHeight="1dp" />
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class ContextMenuAdapter {
|
||||||
if (holoLight) {
|
if (holoLight) {
|
||||||
return ctx.getResources().getColor(R.color.color_white);
|
return ctx.getResources().getColor(R.color.color_white);
|
||||||
} else {
|
} else {
|
||||||
return ctx.getResources().getColor(R.color.dark_drawer_bg_color);
|
return ctx.getResources().getColor(R.color.list_background_dark);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -804,19 +804,6 @@ public class OsmandApplication extends Application {
|
||||||
}
|
}
|
||||||
setLanguage(c);
|
setLanguage(c);
|
||||||
c.setTheme(t);
|
c.setTheme(t);
|
||||||
if (osmandSettings.OSMAND_THEME.get() == OsmandSettings.OSMAND_LIGHT_DARK_ACTIONBAR_THEME
|
|
||||||
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
|
||||||
ActionBar ab = null;
|
|
||||||
if (c instanceof ActionBarActivity) {
|
|
||||||
ab = ((ActionBarActivity) c).getSupportActionBar();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ab != null) {
|
|
||||||
BitmapDrawable bg = (BitmapDrawable) getResources().getDrawable(R.drawable.bg_striped);
|
|
||||||
bg.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT);
|
|
||||||
ab.setBackgroundDrawable(bg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBRouterService getBRouterService() {
|
public IBRouterService getBRouterService() {
|
||||||
|
|
|
@ -1756,7 +1756,7 @@ public class OsmandSettings {
|
||||||
|
|
||||||
public static final int OSMAND_DARK_THEME = 0;
|
public static final int OSMAND_DARK_THEME = 0;
|
||||||
public static final int OSMAND_LIGHT_THEME = 1;
|
public static final int OSMAND_LIGHT_THEME = 1;
|
||||||
public static final int OSMAND_LIGHT_DARK_ACTIONBAR_THEME = 2;
|
|
||||||
|
|
||||||
public final CommonPreference<Integer> SEARCH_TAB =
|
public final CommonPreference<Integer> SEARCH_TAB =
|
||||||
new IntPreference("SEARCH_TAB", 0).makeGlobal().cache();
|
new IntPreference("SEARCH_TAB", 0).makeGlobal().cache();
|
||||||
|
@ -1771,18 +1771,11 @@ public class OsmandSettings {
|
||||||
return OSMAND_THEME.get() == OSMAND_LIGHT_THEME;
|
return OSMAND_THEME.get() == OSMAND_LIGHT_THEME;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLightContentMenu(){
|
|
||||||
return OSMAND_THEME.get() != OSMAND_DARK_THEME || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isLightContent(){
|
public boolean isLightContent(){
|
||||||
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return OSMAND_THEME.get() != OSMAND_DARK_THEME ;
|
return OSMAND_THEME.get() != OSMAND_DARK_THEME ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public final CommonPreference<Boolean> FLUORESCENT_OVERLAYS =
|
public final CommonPreference<Boolean> FLUORESCENT_OVERLAYS =
|
||||||
new BooleanPreference("fluorescent_overlays", false).makeGlobal().cache();
|
new BooleanPreference("fluorescent_overlays", false).makeGlobal().cache();
|
||||||
|
|
|
@ -317,7 +317,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
|
|
||||||
final Builder builder = new AlertDialog.Builder(mapActivity);
|
final Builder builder = new AlertDialog.Builder(mapActivity);
|
||||||
final ArrayAdapter<?> listAdapter =
|
final ArrayAdapter<?> listAdapter =
|
||||||
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContentMenu());
|
adapter.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
||||||
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener() {
|
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -641,12 +641,8 @@ public class MapActivityActions implements DialogProvider {
|
||||||
public void prepareOptionsMenu(final ContextMenuAdapter cm) {
|
public void prepareOptionsMenu(final ContextMenuAdapter cm) {
|
||||||
refreshDrawer = false;
|
refreshDrawer = false;
|
||||||
final ArrayAdapter<?> listAdapter =
|
final ArrayAdapter<?> listAdapter =
|
||||||
cm.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContentMenu());
|
cm.createListAdapter(mapActivity, getMyApplication().getSettings().isLightContent());
|
||||||
mDrawerList.setAdapter(listAdapter);
|
mDrawerList.setAdapter(listAdapter);
|
||||||
mDrawerList.setDivider(mapActivity.getResources().getDrawable(R.drawable.drawer_divider));
|
|
||||||
final int colorHint = cm.getBackgroundColor(mapActivity, getMyApplication().getSettings().isLightContentMenu());
|
|
||||||
mDrawerList.setBackgroundColor(colorHint);
|
|
||||||
mDrawerList.setCacheColorHint(colorHint);
|
|
||||||
mDrawerList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
mDrawerList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -945,12 +941,6 @@ public class MapActivityActions implements DialogProvider {
|
||||||
ArrayAdapter<Object> listAdapter = waypointDialogHelper.getWaypointsDrawerAdapter(mapActivity, running, flat);
|
ArrayAdapter<Object> listAdapter = waypointDialogHelper.getWaypointsDrawerAdapter(mapActivity, running, flat);
|
||||||
mDrawerList.setAdapter(listAdapter);
|
mDrawerList.setAdapter(listAdapter);
|
||||||
refreshDrawer = false;
|
refreshDrawer = false;
|
||||||
mDrawerList.setDivider(mapActivity.getResources().getDrawable(R.drawable.drawer_divider));
|
|
||||||
final int color = getMyApplication().getSettings().isLightContentMenu() ? mapActivity
|
|
||||||
.getResources().getColor(R.color.color_white) : mapActivity.getResources().getColor(
|
|
||||||
R.color.dark_drawer_bg_color);
|
|
||||||
mDrawerList.setBackgroundColor(color);
|
|
||||||
mDrawerList.setCacheColorHint(color);
|
|
||||||
mDrawerList.setOnItemClickListener(waypointDialogHelper.getDrawerItemClickListener(mapActivity, running,
|
mDrawerList.setOnItemClickListener(waypointDialogHelper.getDrawerItemClickListener(mapActivity, running,
|
||||||
listAdapter, null));
|
listAdapter, null));
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,7 +292,7 @@ public class MapActivityLayers {
|
||||||
it.reg();
|
it.reg();
|
||||||
}
|
}
|
||||||
Builder builder = new AlertDialog.Builder(activity);
|
Builder builder = new AlertDialog.Builder(activity);
|
||||||
ListAdapter listAdapter =adapter.createListAdapter(activity, app.getSettings().isLightContentMenu());
|
ListAdapter listAdapter =adapter.createListAdapter(activity, app.getSettings().isLightContent());
|
||||||
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener(){
|
builder.setAdapter(listAdapter, new DialogInterface.OnClickListener(){
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class AvoidSpecificRoads {
|
||||||
}
|
}
|
||||||
final RouteDataObject obj = getItem(position);
|
final RouteDataObject obj = getItem(position);
|
||||||
v.findViewById(R.id.all_points).setVisibility(View.GONE);
|
v.findViewById(R.id.all_points).setVisibility(View.GONE);
|
||||||
((ImageView) v.findViewById(R.id.waypoint_icon)).setImageResource(app.getSettings().isLightContentMenu() ?
|
((ImageView) v.findViewById(R.id.waypoint_icon)).setImageResource(app.getSettings().isLightContent() ?
|
||||||
R.drawable.ic_action_road_works_light : R.drawable.ic_action_road_works_dark);
|
R.drawable.ic_action_road_works_light : R.drawable.ic_action_road_works_dark);
|
||||||
double dist = MapUtils.getDistance(mapLocation, MapUtils.get31LatitudeY(obj.getPoint31YTile(0)),
|
double dist = MapUtils.getDistance(mapLocation, MapUtils.get31LatitudeY(obj.getPoint31YTile(0)),
|
||||||
MapUtils.get31LongitudeX(obj.getPoint31XTile(0)));
|
MapUtils.get31LongitudeX(obj.getPoint31XTile(0)));
|
||||||
|
@ -71,7 +71,7 @@ public class AvoidSpecificRoads {
|
||||||
((TextView) v.findViewById(R.id.waypoint_text)).setText(getText(obj));
|
((TextView) v.findViewById(R.id.waypoint_text)).setText(getText(obj));
|
||||||
ImageButton remove = (ImageButton) v.findViewById(R.id.info_close);
|
ImageButton remove = (ImageButton) v.findViewById(R.id.info_close);
|
||||||
remove.setVisibility(View.VISIBLE);
|
remove.setVisibility(View.VISIBLE);
|
||||||
remove.setImageResource(app.getSettings().isLightContentMenu() ?
|
remove.setImageResource(app.getSettings().isLightContent() ?
|
||||||
R.drawable.ic_action_gremove_light : R.drawable.ic_action_gremove_dark);
|
R.drawable.ic_action_gremove_light : R.drawable.ic_action_gremove_dark);
|
||||||
remove.setOnClickListener(new View.OnClickListener() {
|
remove.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class GpxUiHelper {
|
||||||
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
|
final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR);
|
||||||
Builder b = new AlertDialog.Builder(activity);
|
Builder b = new AlertDialog.Builder(activity);
|
||||||
// final int padding = (int) (12 * activity.getResources().getDisplayMetrics().density + 0.5f);
|
// final int padding = (int) (12 * activity.getResources().getDisplayMetrics().density + 0.5f);
|
||||||
final boolean light = app.getSettings().isLightContentMenu();
|
final boolean light = app.getSettings().isLightContent();
|
||||||
final int layout;
|
final int layout;
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
|
||||||
layout = R.layout.list_menu_item;
|
layout = R.layout.list_menu_item;
|
||||||
|
|
Loading…
Reference in a new issue