mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
Add logs to uınderstand why on meap ready callback is never called
This commit is contained in:
parent
c8b1ebb7fe
commit
edfa39a2d3
1 changed files with 6 additions and 3 deletions
|
|
@ -126,7 +126,7 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
Log.d("deneme2", "onViewCreated is called");
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
this.getView().setFocusableInTouchMode(true);
|
this.getView().setFocusableInTouchMode(true);
|
||||||
this.getView().requestFocus();
|
this.getView().requestFocus();
|
||||||
|
|
@ -151,13 +151,15 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
public void onAttach(Context context) {
|
public void onAttach(Context context) {
|
||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
((NearbyParentFragment)getParentFragment()).childMapFragmentAttached();
|
((NearbyParentFragment)getParentFragment()).childMapFragmentAttached();
|
||||||
|
Log.d("deneme2", ".childMapFragmentAttached() is fired");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MapView setupMapView(Bundle savedInstanceState) {
|
public MapView setupMapView(Bundle savedInstanceState) {
|
||||||
|
Log.d("deneme2", "setuo map view is called");
|
||||||
Timber.d("setting up map view");
|
Timber.d("setting up map view");
|
||||||
boolean isDarkTheme = applicationKvStore.getBoolean("theme", false);
|
boolean isDarkTheme = applicationKvStore.getBoolean("theme", false);
|
||||||
MapboxMapOptions options = new MapboxMapOptions()
|
/*MapboxMapOptions options = new MapboxMapOptions()
|
||||||
.compassGravity(Gravity.BOTTOM | Gravity.LEFT)
|
.compassGravity(Gravity.BOTTOM | Gravity.LEFT)
|
||||||
.compassMargins(new int[]{12, 0, 0, 24})
|
.compassMargins(new int[]{12, 0, 0, 24})
|
||||||
.styleUrl(isDarkTheme ? Style.DARK : Style.OUTDOORS)
|
.styleUrl(isDarkTheme ? Style.DARK : Style.OUTDOORS)
|
||||||
|
|
@ -165,13 +167,14 @@ public class NearbyMapFragment extends CommonsDaggerSupportFragment implements N
|
||||||
.attributionEnabled(false)
|
.attributionEnabled(false)
|
||||||
.camera(new CameraPosition.Builder()
|
.camera(new CameraPosition.Builder()
|
||||||
.zoom(ZOOM_LEVEL)
|
.zoom(ZOOM_LEVEL)
|
||||||
.build());
|
.build());*/
|
||||||
|
|
||||||
MapView mapView = getView().findViewById(R.id.mapView);
|
MapView mapView = getView().findViewById(R.id.mapView);
|
||||||
mapView.onCreate(savedInstanceState);
|
mapView.onCreate(savedInstanceState);
|
||||||
mapView.getMapAsync(new OnMapReadyCallback() {
|
mapView.getMapAsync(new OnMapReadyCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onMapReady(MapboxMap mapboxMap) {
|
public void onMapReady(MapboxMap mapboxMap) {
|
||||||
|
Log.d("deneme2","nearby map is ready");
|
||||||
NearbyMapFragment.this.mapboxMap = mapboxMap;
|
NearbyMapFragment.this.mapboxMap = mapboxMap;
|
||||||
viewsAreReadyCallback.nearbyMapViewReady();
|
viewsAreReadyCallback.nearbyMapViewReady();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue