summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDKTestApp/src
diff options
context:
space:
mode:
authorPablo Guardiola <guardiola31337@gmail.com>2017-04-12 17:45:33 +0200
committerGitHub <noreply@github.com>2017-04-12 17:45:33 +0200
commit7a66ec6c5e442f892e6b4ea5669dac8f25772719 (patch)
tree1c16750e72d2743f6f73c1c6b0b20176084e1eb1 /platform/android/MapboxGLAndroidSDKTestApp/src
parent12b6fdbe3b1caad95089150d5c3ab69af31fb725 (diff)
downloadqtlocation-mapboxgl-7a66ec6c5e442f892e6b4ea5669dac8f25772719.tar.gz
refactor signature from Hole to List<LatLng> (#8722)
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src')
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PolygonActivity.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PolygonActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PolygonActivity.java
index 429509e1d2..b51d717f33 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PolygonActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/PolygonActivity.java
@@ -6,7 +6,6 @@ import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.MenuItem;
-import com.mapbox.mapboxsdk.annotations.Hole;
import com.mapbox.mapboxsdk.annotations.Polygon;
import com.mapbox.mapboxsdk.annotations.PolygonOptions;
import com.mapbox.mapboxsdk.camera.CameraPosition;
@@ -46,8 +45,8 @@ public class PolygonActivity extends AppCompatActivity implements OnMapReadyCall
private boolean fullAlpha = true;
private boolean visible = true;
private boolean color = true;
- private boolean allPoints;
- private boolean holes;
+ private boolean allPoints = true;
+ private boolean holes = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -146,7 +145,7 @@ public class PolygonActivity extends AppCompatActivity implements OnMapReadyCall
return true;
case R.id.action_id_holes:
holes = !holes;
- polygon.setHoles(holes ? STAR_SHAPE_HOLES : Collections.<Hole>emptyList());
+ polygon.setHoles(holes ? STAR_SHAPE_HOLES : Collections.<List<LatLng>>emptyList());
return true;
default:
return super.onOptionsItemSelected(item);
@@ -188,9 +187,9 @@ public class PolygonActivity extends AppCompatActivity implements OnMapReadyCall
static final List<LatLng> BROKEN_SHAPE_POINTS =
STAR_SHAPE_POINTS.subList(0, STAR_SHAPE_POINTS.size() - 3);
- static final List<? extends Hole> STAR_SHAPE_HOLES = new ArrayList<Hole>() {
+ static final List<? extends List<LatLng>> STAR_SHAPE_HOLES = new ArrayList<List<LatLng>>() {
{
- add(new Hole(new ArrayList<LatLng>() {
+ add(new ArrayList<>(new ArrayList<LatLng>() {
{
add(new LatLng(45.521743, -122.669091));
add(new LatLng(45.530483, -122.676833));
@@ -198,7 +197,7 @@ public class PolygonActivity extends AppCompatActivity implements OnMapReadyCall
add(new LatLng(45.521743, -122.669091));
}
}));
- add(new Hole(new ArrayList<LatLng>() {
+ add(new ArrayList<>(new ArrayList<LatLng>() {
{
add(new LatLng(45.529743, -122.662791));
add(new LatLng(45.525543, -122.662791));