[android] - add example of showing a MapView inside a ViewPager inside RecyclerView
This commit is contained in:
@@ -89,7 +89,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
|
||||
private MapKeyListener mapKeyListener;
|
||||
@Nullable
|
||||
private Bundle savedInstanceState;
|
||||
private boolean isActivated;
|
||||
private boolean isStarted;
|
||||
|
||||
@UiThread
|
||||
public MapView(@NonNull Context context) {
|
||||
@@ -346,10 +346,10 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
|
||||
*/
|
||||
@UiThread
|
||||
public void onStart() {
|
||||
if (!isActivated) {
|
||||
if (!isStarted) {
|
||||
ConnectivityReceiver.instance(getContext()).activate();
|
||||
FileSource.getInstance(getContext()).activate();
|
||||
isActivated = true;
|
||||
isStarted = true;
|
||||
}
|
||||
if (mapboxMap != null) {
|
||||
mapboxMap.onStart();
|
||||
@@ -395,10 +395,10 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
|
||||
mapRenderer.onStop();
|
||||
}
|
||||
|
||||
if (isActivated) {
|
||||
if (isStarted) {
|
||||
ConnectivityReceiver.instance(getContext()).deactivate();
|
||||
FileSource.getInstance(getContext()).deactivate();
|
||||
isActivated = false;
|
||||
isStarted = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user