tags:

views:

79

answers:

1

I am a new android developer, just tried something with Android Tablayout.

There are two tabs and one tab has a GridView and the other one has a DatePicker. I created an activity and layout for each tab.

The problem is that when I switch to the gridView, the background is not refreshed, and the images are just drawn over the DatePicker, so through images, the DatePicker still can be seen. It really bothers me.

What should I do to have a clean background for imageView?

Steve

A: 

There is something wrong with your layouts if you are seeing that behavior. Here is a sample project showing multiple activities as the contents of tabs. Here is another sample project that takes the more efficient approach of just using Views as the contents of tabs. Hopefully, by examining these, you can see where things may be going wrong with your layouts.

CommonsWare
Thanks for providing the useful samples. I could get right result while following both samples. But still have some problem when I try to define layout for each activity. Still not quite sure what is the problem. Do you have a sample for that? I really appreciate all the help.