1
1
mirror of https://github.com/Pygmalion69/OpenTopoMapViewer.git synced 2025-10-05 15:52:55 +02:00

AGP upgrade

This commit is contained in:
Pygmalion69
2023-10-15 10:57:34 +02:00
parent 11b25c9337
commit 1f2d2e00d6
13 changed files with 32 additions and 32 deletions

View File

@@ -1,31 +1,31 @@
package org.nitri.opentopo.overlay;
import android.view.MotionEvent;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.Overlay;
public class GestureOverlay extends Overlay {
GestureCallback gestureCallback;
public GestureOverlay(GestureCallback gestureCallback) {
this.gestureCallback = gestureCallback;
}
@Override
public boolean onFling(MotionEvent pEvent1, MotionEvent pEvent2, float pVelocityX, float pVelocityY, MapView pMapView) {
gestureCallback.onUserMapInteraction();
return super.onFling(pEvent1, pEvent2, pVelocityX, pVelocityY, pMapView);
}
@Override
public boolean onScroll(MotionEvent pEvent1, MotionEvent pEvent2, float pDistanceX, float pDistanceY, MapView pMapView) {
gestureCallback.onUserMapInteraction();
return super.onScroll(pEvent1, pEvent2, pDistanceX, pDistanceY, pMapView);
}
public interface GestureCallback {
void onUserMapInteraction();
}
}
package org.nitri.opentopo.overlay;
import android.view.MotionEvent;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.Overlay;
public class GestureOverlay extends Overlay {
GestureCallback gestureCallback;
public GestureOverlay(GestureCallback gestureCallback) {
this.gestureCallback = gestureCallback;
}
@Override
public boolean onFling(MotionEvent pEvent1, MotionEvent pEvent2, float pVelocityX, float pVelocityY, MapView pMapView) {
gestureCallback.onUserMapInteraction();
return super.onFling(pEvent1, pEvent2, pVelocityX, pVelocityY, pMapView);
}
@Override
public boolean onScroll(MotionEvent pEvent1, MotionEvent pEvent2, float pDistanceX, float pDistanceY, MapView pMapView) {
gestureCallback.onUserMapInteraction();
return super.onScroll(pEvent1, pEvent2, pDistanceX, pDistanceY, pMapView);
}
public interface GestureCallback {
void onUserMapInteraction();
}
}

0
app/src/main/res/drawable-hdpi/ic_map_bearing.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
app/src/main/res/drawable-hdpi/ic_map_location.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
app/src/main/res/drawable-mdpi/ic_map_bearing.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

0
app/src/main/res/drawable-mdpi/ic_map_location.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
app/src/main/res/drawable-xhdpi/ic_map_bearing.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

0
app/src/main/res/drawable-xhdpi/ic_map_location.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

0
app/src/main/res/drawable-xxhdpi/ic_map_bearing.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
app/src/main/res/drawable-xxhdpi/ic_map_location.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

0
app/src/main/res/drawable-xxxhdpi/ic_map_bearing.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

0
app/src/main/res/drawable-xxxhdpi/ic_map_location.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -7,7 +7,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.1.2'
}
}

0
gradlew vendored Normal file → Executable file
View File