[android] - fix breaking build on master (#6225)
* [android] - fix breaking build, by implementing mapboxMap on VideoViewActivity * fix layout file for auto generated tests * [android] fix resource id
This commit is contained in:
@@ -14,11 +14,12 @@ import com.mapbox.mapboxsdk.maps.MapboxMap;
|
||||
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
|
||||
import com.mapbox.mapboxsdk.testapp.R;
|
||||
|
||||
import static android.media.MediaPlayer.*;
|
||||
import static android.media.MediaPlayer.OnPreparedListener;
|
||||
|
||||
public class VideoViewActivity extends AppCompatActivity {
|
||||
|
||||
private MapView mapView;
|
||||
private MapboxMap mapboxMap;
|
||||
private VideoView videoView;
|
||||
|
||||
@Override
|
||||
@@ -48,8 +49,14 @@ public class VideoViewActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
mapView = (MapView) findViewById(R.id.map_view);
|
||||
mapView = (MapView) findViewById(R.id.mapView);
|
||||
mapView.onCreate(savedInstanceState);
|
||||
mapView.getMapAsync(new OnMapReadyCallback() {
|
||||
@Override
|
||||
public void onMapReady(MapboxMap mapboxMap) {
|
||||
VideoViewActivity.this.mapboxMap = mapboxMap;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
@@ -12,7 +11,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/primary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<VideoView
|
||||
android:id="@+id/video_view"
|
||||
@@ -21,18 +20,18 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_margin="16dp"/>
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
<com.mapbox.mapboxsdk.maps.MapView
|
||||
android:id="@+id/map_view"
|
||||
android:id="@id/mapView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/toolbar"
|
||||
mapbox:attribution_gravity="top"
|
||||
mapbox:center_latitude="34.4021"
|
||||
mapbox:center_longitude="-119.7081"
|
||||
mapbox:attribution_gravity="top"
|
||||
mapbox:logo_gravity="top"
|
||||
mapbox:style_url="mapbox://styles/mapbox/streets-v9"
|
||||
mapbox:zoom="13"/>
|
||||
mapbox:zoom="13" />
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user