Use Osmagray theme in samples #300

This commit is contained in:
Emux 2017-02-27 21:35:38 +02:00
parent c9e1c81cca
commit 3dbc44e9c2
6 changed files with 36 additions and 16 deletions

View File

@ -3,6 +3,7 @@
## New since 0.7.0
- Symbol rotation [#294](https://github.com/mapsforge/vtm/issues/294)
- Osmagray theme [#300](https://github.com/mapsforge/vtm/issues/300)
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.8.0)

View File

@ -8,12 +8,15 @@
android:id="@+id/theme_default"
android:checked="true"
android:title="@string/theme_default" />
<item
android:id="@+id/theme_tubes"
android:title="@string/theme_tubes" />
<item
android:id="@+id/theme_osmarender"
android:title="@string/theme_osmarender" />
<item
android:id="@+id/theme_osmagray"
android:title="@string/theme_osmagray" />
<item
android:id="@+id/theme_tubes"
android:title="@string/theme_tubes" />
<item
android:id="@+id/theme_newtron"
android:title="@string/theme_newtron" />

View File

@ -2,8 +2,9 @@
<string name="app_name">VTM Samples</string>
<string name="theme_default">Default</string>
<string name="theme_tubes">Tubes</string>
<string name="theme_osmarender">Osmarender</string>
<string name="theme_osmagray">Osmagray</string>
<string name="theme_tubes">Tubes</string>
<string name="theme_newtron">NewTron</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>

View File

@ -1,6 +1,6 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@ -86,13 +86,18 @@ public class BaseMapActivity extends MapActivity {
item.setChecked(true);
return true;
case R.id.theme_tubes:
mMap.setTheme(VtmThemes.TRONRENDER);
case R.id.theme_osmarender:
mMap.setTheme(VtmThemes.OSMARENDER);
item.setChecked(true);
return true;
case R.id.theme_osmarender:
mMap.setTheme(VtmThemes.OSMARENDER);
case R.id.theme_osmagray:
mMap.setTheme(VtmThemes.OSMAGRAY);
item.setChecked(true);
return true;
case R.id.theme_tubes:
mMap.setTheme(VtmThemes.TRONRENDER);
item.setChecked(true);
return true;

View File

@ -1,6 +1,6 @@
/*
* Copyright 2014 Hannes Janetzek
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@ -70,13 +70,18 @@ public class MapsforgeMapActivity extends MapActivity {
item.setChecked(true);
return true;
case R.id.theme_tubes:
mMap.setTheme(VtmThemes.TRONRENDER);
case R.id.theme_osmarender:
mMap.setTheme(VtmThemes.OSMARENDER);
item.setChecked(true);
return true;
case R.id.theme_osmarender:
mMap.setTheme(VtmThemes.OSMARENDER);
case R.id.theme_osmagray:
mMap.setTheme(VtmThemes.OSMAGRAY);
item.setChecked(true);
return true;
case R.id.theme_tubes:
mMap.setTheme(VtmThemes.TRONRENDER);
item.setChecked(true);
return true;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@ -115,11 +115,16 @@ public class InputHandler implements InputProcessor {
break;
case Input.Keys.NUM_3:
mMap.setTheme(VtmThemes.TRONRENDER);
mMap.setTheme(VtmThemes.OSMAGRAY);
mMap.updateMap(false);
break;
case Input.Keys.NUM_4:
mMap.setTheme(VtmThemes.TRONRENDER);
mMap.updateMap(false);
break;
case Input.Keys.NUM_5:
mMap.setTheme(VtmThemes.NEWTRON);
mMap.updateMap(false);
break;