Box night free simple

This commit is contained in:
Victor Shcherb 2012-12-23 23:24:57 +01:00
parent 8cf2d8d931
commit 4abb4a2ed1
4 changed files with 15 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -102,7 +102,7 @@ public class OsmAndFormatter {
float kmh = metersperseconds * 3.6f;
if (mc == MetricsConstants.KILOMETERS_AND_METERS) {
if (kmh >= 15 || (am == ApplicationMode.CAR)) {
return ((int) kmh) + " " + ctx.getString(R.string.km_h);
return ((int) Math.round(kmh)) + " " + ctx.getString(R.string.km_h);
}
int kmh10 = (int) (kmh * 10f);
if (kmh10 % 10 == 0) {
@ -113,7 +113,7 @@ public class OsmAndFormatter {
} else {
float mph = kmh * METERS_IN_KILOMETER / METERS_IN_ONE_MILE;
if (mph >= 10) {
return ((int) (mph)) + " " + ctx.getString(R.string.mile_per_hour);
return ((int) Math.round(mph)) + " " + ctx.getString(R.string.mile_per_hour);
} else {
int mph10 = (int) (mph * 10f);
if(mph10 % 10 == 0) {

View file

@ -46,6 +46,7 @@ import android.preference.PreferenceScreen;
import android.provider.MediaStore;
import android.text.format.DateFormat;
import android.view.Display;
import android.view.KeyEvent;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
@ -515,5 +516,13 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
indexingFiles(null);
}
}
public boolean onMapActivityKeyEvent(KeyEvent key){
if(KeyEvent.KEYCODE_CAMERA == key.getKeyCode()) {
// TODO;
return true;
}
return false;
}
}

View file

@ -614,12 +614,15 @@ public class MapInfoLayer extends OsmandMapLayer {
int boxTopR;
int boxTopL;
int expand;
Drawable boxFree = view.getResources().getDrawable(R.drawable.box_free_simple);
if (nightMode) {
boxTop = R.drawable.box_top_n;
boxTopStack = R.drawable.box_top_n_stack;
boxTopR = R.drawable.box_top_rn;
boxTopL = R.drawable.box_top_ln;
expand = R.drawable.box_expand_t;
boxFree = view.getResources().getDrawable(R.drawable.box_night_free_simple);
} else if (transparent) {
boxTop = R.drawable.box_top_t;
boxTopStack = R.drawable.box_top_t_stack;
@ -633,6 +636,7 @@ public class MapInfoLayer extends OsmandMapLayer {
boxTopL = R.drawable.box_top_l;
expand = R.drawable.box_expand;
}
alarmControl.setBackgroundDrawable(boxFree);
rightStack.setTopDrawable(view.getResources().getDrawable(boxTopR));
rightStack.setStackDrawable(boxTopStack);