I'm using sliding menu for Android here is the link, when I slide on rendered map fragment, the sliding menu goes blank.
Here is my map fragment code.
public class BasicMapActivity extends SherlockFragment {
private MapView mMapView;
private GoogleMap mMap;
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.basic_demo, null);
// view.setBackgroundColor(0x00000000);
mMapView = (MapView) view.findViewById(R.id.map);
container.requestTransparentRegion(mMapView);
mMapView.onCreate(savedInstanceState);
return view;
}
}
Here is my home activity where in i render map.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home_frame);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.home_screen, new BasicMapActivity())
.commit();
getSlidingMenu().setSecondaryMenu(
getLayoutInflater().inflate(R.layout.resq_events_frame, null));
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.resq_events_screen, new EventsFragment())
.commit();
// set the Behind View
setBehindContentView(R.layout.activity_settings_frame);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.settings_screen, new SettingsFragment())
.commit();
// customize the SlidingMenu
getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
}
My XML file looks like this
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/home_screen"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
How to overcome by this issue?
Here how the image looks.