diff --git a/extern/vtm b/extern/vtm index b18dae5b..ec4f12b5 160000 --- a/extern/vtm +++ b/extern/vtm @@ -1 +1 @@ -Subproject commit b18dae5bef355c922e7ec9497c6ddbbe48061514 +Subproject commit ec4f12b576906b01d8bf2f1033c8014b6affeb8b diff --git a/play-services-core/build.gradle b/play-services-core/build.gradle index 7031713e..bbd5a1b0 100644 --- a/play-services-core/build.gradle +++ b/play-services-core/build.gradle @@ -31,7 +31,7 @@ dependencies { compile project(':vtm-android') compile project(':vtm-extras') compile project(':vtm-jts') - compile project(':vtm-themes') + compile project(':vtm-microg-theme') } String getMyVersionName() { diff --git a/play-services-core/src/main/java/org/microg/gms/maps/BackendMap.java b/play-services-core/src/main/java/org/microg/gms/maps/BackendMap.java index 20586dfa..421b9495 100644 --- a/play-services-core/src/main/java/org/microg/gms/maps/BackendMap.java +++ b/play-services-core/src/main/java/org/microg/gms/maps/BackendMap.java @@ -170,7 +170,8 @@ public class BackendMap implements ItemizedLayer.OnItemGestureListener(map(), new MarkerSymbol( new AndroidBitmap(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.nop)), 0.5F, 1))); - map().setTheme(VtmThemes.DEFAULT); + map().setTheme(MicrogThemes.DEFAULT); } } diff --git a/settings.gradle b/settings.gradle index 6cf00ed6..1d235393 100644 --- a/settings.gradle +++ b/settings.gradle @@ -26,6 +26,6 @@ include ':vtm' include ':vtm-android' include ':vtm-extras' include ':vtm-jts' -include ':vtm-themes' +include ':vtm-microg-theme' include ':remote-droid-guard-lib' diff --git a/vtm-microg-theme/build.gradle b/vtm-microg-theme/build.gradle new file mode 100644 index 00000000..e22d86c4 --- /dev/null +++ b/vtm-microg-theme/build.gradle @@ -0,0 +1,11 @@ +apply plugin: 'java' +apply plugin: 'maven' + +dependencies { + compile project(':vtm') +} + +sourceSets { + main.java.srcDirs = ['src'] + main.resources.srcDirs = ['resources'] +} diff --git a/vtm-microg-theme/resources/assets/styles/microg.xml b/vtm-microg-theme/resources/assets/styles/microg.xml new file mode 100644 index 00000000..f8034d16 --- /dev/null +++ b/vtm-microg-theme/resources/assets/styles/microg.xml @@ -0,0 +1,422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vtm-microg-theme/resources/assets/symbols/dot_white.svg b/vtm-microg-theme/resources/assets/symbols/dot_white.svg new file mode 100644 index 00000000..af547354 --- /dev/null +++ b/vtm-microg-theme/resources/assets/symbols/dot_white.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/vtm-microg-theme/src/org/oscim/theme/MicrogThemes.java b/vtm-microg-theme/src/org/oscim/theme/MicrogThemes.java new file mode 100644 index 00000000..1eb5a8af --- /dev/null +++ b/vtm-microg-theme/src/org/oscim/theme/MicrogThemes.java @@ -0,0 +1,32 @@ +package org.oscim.theme; + +import org.oscim.backend.AssetAdapter; + +import java.io.InputStream; + +public enum MicrogThemes implements ThemeFile { + + DEFAULT("styles/microg.xml"); + // TODO: night theme + + private final String mPath; + + MicrogThemes(String path) { + mPath = path; + } + + @Override + public XmlRenderThemeMenuCallback getMenuCallback() { + return null; + } + + @Override + public String getRelativePathPrefix() { + return ""; + } + + @Override + public InputStream getRenderThemeAsStream() { + return AssetAdapter.readFileAsStream(mPath); + } +} diff --git a/vtm-themes b/vtm-themes deleted file mode 120000 index 41f63285..00000000 --- a/vtm-themes +++ /dev/null @@ -1 +0,0 @@ -extern/vtm/vtm-themes \ No newline at end of file