i want to show/hide googleMap.
GoogleMap googleMap = ((SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map2)).getMap();
how to set setVisibility(View.INVISIBLE) OR setVisibility(View.VISIBLE) ??
you should hide the Fragment itself, or you can try with getView().setVisibility(View.INVISIBLE) inside the SupportMapFragment subclass.
From your Activity:
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction()
ft.hide(mFragment).commit();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With