mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Fix double click to map icon and refresh icon click
This commit is contained in:
parent
f6ac8fd1a5
commit
470ad29380
3 changed files with 7 additions and 15 deletions
|
|
@ -55,9 +55,12 @@ public class NearbyActivity extends BaseActivity {
|
|||
}
|
||||
|
||||
private void showMapView() {
|
||||
isMapViewActive = true;
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, new NearbyMapFragment()).commit();
|
||||
if(!isMapViewActive){
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.container, new NearbyMapFragment()).commit();
|
||||
isMapViewActive = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -48,8 +48,6 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.fragment_nearby_map, container, false);
|
||||
ButterKnife.bind(this, view);
|
||||
MapboxMapOptions options = new MapboxMapOptions()
|
||||
.styleUrl(Style.OUTDOORS)
|
||||
.camera(new CameraPosition.Builder()
|
||||
|
|
@ -60,9 +58,8 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
|
|||
// create map
|
||||
mapView = new MapView(getActivity(), options);
|
||||
mapView.onCreate(savedInstanceState);
|
||||
getActivity().setContentView(mapView);
|
||||
setHasOptionsMenu(false);
|
||||
return view;
|
||||
return mapView;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:mapbox="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue