Fix double click to map icon and refresh icon click

This commit is contained in:
Neslihan 2017-05-12 18:41:25 +03:00
parent f6ac8fd1a5
commit 470ad29380
3 changed files with 7 additions and 15 deletions

View file

@ -55,9 +55,12 @@ public class NearbyActivity extends BaseActivity {
}
private void showMapView() {
isMapViewActive = true;
if(!isMapViewActive){
getSupportFragmentManager().beginTransaction()
.replace(R.id.container, new NearbyMapFragment()).commit();
isMapViewActive = true;
}
}
@Override

View file

@ -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

View file

@ -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>