mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +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) {
|
||||
super.onCreate(savedInstanceState);
|
||||
Bundle bundle = this.getArguments();
|
||||
initViews();
|
||||
setListeners();
|
||||
//initViews();
|
||||
//setListeners();
|
||||
Gson gson = new GsonBuilder()
|
||||
.registerTypeAdapter(Uri.class, new UriDeserializer())
|
||||
.create();
|
||||
|
|
@ -642,13 +642,17 @@ public class NearbyMapFragment extends DaggerFragment {
|
|||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
if (mapView != null) {
|
||||
mapView.onResume();
|
||||
if (mapboxMap!=null) {
|
||||
mapboxMap.clear(); // To clear nearby markers from previous setup
|
||||
}
|
||||
}
|
||||
super.onResume();
|
||||
initViews();
|
||||
setListeners();
|
||||
transparentView.setClickable(false);
|
||||
transparentView.setAlpha(0);
|
||||
/*closeFabs(isFabOpen);
|
||||
hideFAB();
|
||||
this.getView().requestFocus();*/
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue