From 5aba3ac373aa115664ef50bde8a285280d93698c Mon Sep 17 00:00:00 2001 From: Emux Date: Thu, 8 Feb 2018 09:35:44 +0200 Subject: [PATCH] Animator2 samples #497 --- docs/Changelog.md | 4 +-- vtm-android-example/AndroidManifest.xml | 3 ++ .../oscim/android/test/Animator2Activity.java | 32 +++++++++++++++++++ .../src/org/oscim/android/test/Samples.java | 1 + .../src/org/oscim/test/Animator2Test.java | 28 ++++++++++++++++ 5 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 vtm-android-example/src/org/oscim/android/test/Animator2Activity.java create mode 100644 vtm-playground/src/org/oscim/test/Animator2Test.java diff --git a/docs/Changelog.md b/docs/Changelog.md index 823b29d5..d3e834a1 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -10,7 +10,7 @@ - Render themes: styles improvements [#479](https://github.com/mapsforge/vtm/pull/479) - Internal render themes improvements [#488](https://github.com/mapsforge/vtm/pull/488) - Map view roll [#474](https://github.com/mapsforge/vtm/pull/474) -- Fling animation improvements [#489](https://github.com/mapsforge/vtm/pull/489) +- Physical fling implementation [#497](https://github.com/mapsforge/vtm/pull/497) - Polygon symbols default disabled [#405](https://github.com/mapsforge/vtm/issues/405) - Map fractional zoom [#487](https://github.com/mapsforge/vtm/issues/487) - Render theme fallback internal resources [#477](https://github.com/mapsforge/vtm/issues/477) @@ -88,7 +88,7 @@ ## Version 0.7.0 (2017-02-26) - Mapsforge multiple map files [#208](https://github.com/mapsforge/vtm/issues/208) -- Improved gestures implementation [#253](https://github.com/mapsforge/vtm/issues/253) +- New gestures implementation [#253](https://github.com/mapsforge/vtm/issues/253) - Polygon label position enhancements [#80](https://github.com/mapsforge/vtm/issues/80) - vtm-web modules update [#51](https://github.com/mapsforge/vtm/issues/51) - Mapzen MVT vector tiles [#57](https://github.com/mapsforge/vtm/issues/57) diff --git a/vtm-android-example/AndroidManifest.xml b/vtm-android-example/AndroidManifest.xml index d299ebf6..ab246a2e 100644 --- a/vtm-android-example/AndroidManifest.xml +++ b/vtm-android-example/AndroidManifest.xml @@ -21,6 +21,9 @@ + diff --git a/vtm-android-example/src/org/oscim/android/test/Animator2Activity.java b/vtm-android-example/src/org/oscim/android/test/Animator2Activity.java new file mode 100644 index 00000000..ae3d7783 --- /dev/null +++ b/vtm-android-example/src/org/oscim/android/test/Animator2Activity.java @@ -0,0 +1,32 @@ +/* + * Copyright 2018 devemux86 + * + * This program is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package org.oscim.android.test; + +import org.oscim.utils.Parameters; + +public class Animator2Activity extends MarkerOverlayActivity { + + public Animator2Activity() { + super(); + Parameters.ANIMATOR2 = true; + } + + @Override + protected void onDestroy() { + super.onDestroy(); + + Parameters.ANIMATOR2 = false; + } +} diff --git a/vtm-android-example/src/org/oscim/android/test/Samples.java b/vtm-android-example/src/org/oscim/android/test/Samples.java index 01d33c45..082d6848 100644 --- a/vtm-android-example/src/org/oscim/android/test/Samples.java +++ b/vtm-android-example/src/org/oscim/android/test/Samples.java @@ -119,6 +119,7 @@ public class Samples extends Activity { linearLayout.addView(createButton(LocationActivity.class)); linearLayout.addView(createLabel("User Interaction")); + linearLayout.addView(createButton(Animator2Activity.class)); linearLayout.addView(createButton(MapEventLayer2Activity.class)); linearLayout.addView(createButton(LayerGroupActivity.class)); diff --git a/vtm-playground/src/org/oscim/test/Animator2Test.java b/vtm-playground/src/org/oscim/test/Animator2Test.java new file mode 100644 index 00000000..32278084 --- /dev/null +++ b/vtm-playground/src/org/oscim/test/Animator2Test.java @@ -0,0 +1,28 @@ +/* + * Copyright 2018 devemux86 + * + * This program is free software: you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along with + * this program. If not, see . + */ +package org.oscim.test; + +import org.oscim.gdx.GdxMapApp; +import org.oscim.utils.Parameters; + +public class Animator2Test extends MarkerLayerTest { + + public static void main(String[] args) { + Parameters.ANIMATOR2 = true; + + GdxMapApp.init(); + GdxMapApp.run(new Animator2Test()); + } +}