[android] #4253 - remove MapboxMapActivity
This commit is contained in:
@@ -23,9 +23,6 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MapboxMapActivity"
|
||||
android:label="@string/action_mapboxmap" />
|
||||
<activity
|
||||
android:name=".LatLngBoundsActivity"
|
||||
android:label="@string/activity_visible_coordinate_bounds" />
|
||||
|
||||
@@ -358,10 +358,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
uiSettings.setCompassEnabled(!uiSettings.isCompassEnabled());
|
||||
return true;
|
||||
|
||||
case R.id.action_mapboxmap:
|
||||
startActivity(new Intent(getApplicationContext(), MapboxMapActivity.class));
|
||||
return true;
|
||||
|
||||
case R.id.action_info_window_adapter:
|
||||
startActivity(new Intent(getApplicationContext(), InfoWindowAdapterActivity.class));
|
||||
return true;
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
package com.mapbox.mapboxsdk.testapp;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v7.app.ActionBar;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import com.mapbox.mapboxsdk.camera.CameraPosition;
|
||||
import com.mapbox.mapboxsdk.camera.CameraUpdateFactory;
|
||||
import com.mapbox.mapboxsdk.geometry.LatLng;
|
||||
import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.mapboxsdk.constants.Style;
|
||||
import com.mapbox.mapboxsdk.testapp.utils.ApiAccess;
|
||||
import com.mapbox.mapboxsdk.maps.MapView;
|
||||
|
||||
public class MapboxMapActivity extends AppCompatActivity {
|
||||
|
||||
private MapView mMapView;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_mapboxmap);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
ActionBar actionBar = getSupportActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
actionBar.setDisplayShowHomeEnabled(true);
|
||||
}
|
||||
|
||||
mMapView = (MapView) findViewById(R.id.mapView);
|
||||
mMapView.setAccessToken(ApiAccess.getToken(this));
|
||||
mMapView.setStyle(Style.SATELLITE_STREETS);
|
||||
mMapView.onCreate(savedInstanceState);
|
||||
|
||||
mMapView.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(@NonNull MapboxMap mapboxMap) {
|
||||
mapboxMap.moveCamera(CameraUpdateFactory.newCameraPosition(
|
||||
new CameraPosition.Builder()
|
||||
.target(new LatLng(43.876550, -103.454791))
|
||||
.zoom(14)
|
||||
.build()));
|
||||
}
|
||||
});
|
||||
|
||||
Snackbar.make(findViewById(android.R.id.content),
|
||||
"Demo MapboxMap API",
|
||||
Snackbar.LENGTH_INDEFINITE).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
mMapView.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mMapView.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mMapView.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
mMapView.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSaveInstanceState(Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
mMapView.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
mMapView.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLowMemory() {
|
||||
super.onLowMemory();
|
||||
mMapView.onLowMemory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
onBackPressed();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M12,11.55C9.64,9.35 6.48,8 3,8v11c3.48,0 6.64,1.35 9,3.55 2.36,-2.19 5.52,-3.55 9,-3.55V8c-3.48,0 -6.64,1.35 -9,3.55zM12,8c1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3 1.34,3 3,3z"/>
|
||||
</vector>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:style_url="@string/style_mapbox_streets"
|
||||
app:center_latitude="38.897705003219784"
|
||||
app:center_longitude="-77.03655168667463"
|
||||
app:zoom="15" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -78,12 +78,6 @@
|
||||
android:icon="@drawable/ic_airplanemode_active_black_24dp"
|
||||
android:title="@string/action_offline" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_mapboxmap"
|
||||
android:checkable="false"
|
||||
android:icon="@drawable/ic_mapboxmap"
|
||||
android:title="@string/action_mapboxmap" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_tilt"
|
||||
android:checkable="false"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<string name="app_name">Mapbox GL</string>
|
||||
|
||||
<!-- Test Activities -->
|
||||
<string name="activity_mapboxmap">MapboxMap</string>
|
||||
<string name="activity_tilt">Map Tilt</string>
|
||||
<string name="activity_infowindow_adapter">InfoWindow Adapter</string>
|
||||
<string name="activity_map_fragment_suport">Support Map Fragment Activity</string>
|
||||
@@ -38,7 +37,6 @@
|
||||
<string name="action_custom_layer">Custom Layer</string>
|
||||
<string name="action_debug">Cycle map debug options</string>
|
||||
<string name="action_point_annotations">Toggle point annotations</string>
|
||||
<string name="action_mapboxmap">MapboxMap</string>
|
||||
<string name="action_info_window_adapter">InfoWindow Adapter</string>
|
||||
<string name="action_tilt">Tilt</string>
|
||||
<string name="action_map_fragment">MapFragment</string>
|
||||
|
||||
Reference in New Issue
Block a user