Android build config maintenance (#2465)

This commit is contained in:
Bart Louwers
2024-06-04 17:26:14 +02:00
committed by GitHub
parent 4280dfb5ca
commit e546889063
14 changed files with 17 additions and 21 deletions

View File

@@ -78,6 +78,7 @@ android {
buildFeatures {
viewBinding = true
buildConfig true
}
namespace 'org.maplibre.android.testapp'

View File

@@ -26,7 +26,7 @@ class QueryRenderedFeaturesBoxSymbolCountActivity : AppCompatActivity() {
lateinit var mapView: MapView
lateinit var maplibreMap: MapLibreMap
private set
private lateinit var toast: Toast
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_query_features_box)
@@ -80,15 +80,11 @@ class QueryRenderedFeaturesBoxSymbolCountActivity : AppCompatActivity() {
val features = maplibreMap.queryRenderedFeatures(box, "symbols-layer")
// Show count
if (toast != null) {
toast!!.cancel()
}
toast = Toast.makeText(
Toast.makeText(
this@QueryRenderedFeaturesBoxSymbolCountActivity,
String.format("%s features in box", features.size),
"${features.size} feature${if (features.size == 1) "" else "s"} in box",
Toast.LENGTH_SHORT
)
toast.show()
).show()
}
}
}

View File

@@ -9,7 +9,6 @@
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
app:maplibre_cameraZoom="1"/>
</RelativeLayout>

View File

@@ -9,7 +9,6 @@
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
app:maplibre_cameraBearing="220"
app:maplibre_cameraTargetLat="50.871062"
app:maplibre_cameraTargetLng="1.583210"

View File

@@ -9,7 +9,6 @@
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
app:maplibre_cameraTargetLat="38.87031"
app:maplibre_cameraTargetLng="-77.00897"
app:maplibre_cameraZoom="10"/>

View File

@@ -9,7 +9,6 @@
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/toolbar"
app:maplibre_cameraTargetLat="45.1855569"
app:maplibre_cameraTargetLng="5.7215506"
app:maplibre_cameraZoom="11"

View File

@@ -9,7 +9,6 @@
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
app:maplibre_cameraTargetLat="52.0907"
app:maplibre_cameraTargetLng="5.1214"
app:maplibre_cameraZoom="16"/>