• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps FrameLayout addView problem

hfdjw

Newbie
When I try to add view to FrameLayout with this:
[HIGH] MainActivity.mainFrame.removeAllViews(); MainActivity.mainFrame.addView(MainActivity.galleryDetailsNews);
MainActivity.mainFrame.destroyDrawingCache();
MainActivity.mainFrame.buildDrawingCache();
MainActivity.mainFrame.refreshDrawableState();
MainActivity.mainFrame.setVisibility(View.INVISIBLE);
MainActivity.mainFrame.setVisibility(View.VISIBLE);
MainActivity.detailsGallery.setVisibility(View.INVISIBLE);
MainActivity.detailsGallery.setVisibility(View.VISIBLE);[/HIGH]
The Screen of FrameLayout become black . But when I press the button for recent aps and click my app the view magically appears . The most Interesting part is that when I try to change the view in the FrameLayout again there is no problem.
 
Back
Top Bottom