mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Fix crash on orientation change
This commit is contained in:
parent
bea3333707
commit
d51e7e624c
1 changed files with 10 additions and 6 deletions
|
|
@ -112,8 +112,8 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
Bundle bundle = this.getArguments();
|
Bundle bundle = this.getArguments();
|
||||||
initViews();
|
//initViews();
|
||||||
setListeners();
|
//setListeners();
|
||||||
Gson gson = new GsonBuilder()
|
Gson gson = new GsonBuilder()
|
||||||
.registerTypeAdapter(Uri.class, new UriDeserializer())
|
.registerTypeAdapter(Uri.class, new UriDeserializer())
|
||||||
.create();
|
.create();
|
||||||
|
|
@ -642,13 +642,17 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
if (mapView != null) {
|
if (mapView != null) {
|
||||||
mapView.onResume();
|
mapView.onResume();
|
||||||
if (mapboxMap!=null) {
|
|
||||||
mapboxMap.clear(); // To clear nearby markers from previous setup
|
|
||||||
}
|
}
|
||||||
}
|
initViews();
|
||||||
super.onResume();
|
setListeners();
|
||||||
|
transparentView.setClickable(false);
|
||||||
|
transparentView.setAlpha(0);
|
||||||
|
/*closeFabs(isFabOpen);
|
||||||
|
hideFAB();
|
||||||
|
this.getView().requestFocus();*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue