As it turns out, there seems to be a bug in the system. If you set the
background of a list or a grid (even if it is a solid color) then that
disappears when you touch around it. This is inspite of disabling
cacheColorHint. If you really want to set the background of a list
make the list/grid a child of a layout (LinearLayout, Relative Layout,
FrameLayout) and set the background of the layout.


On Aug 27, 5:47 pm, Rohit <[email protected]> wrote:
> I have an activity whose theme I set to be Theme.Dialog (in
> AndroidManifest.xml), however I want the size and background of this
> to be slightly different. I do this in code (in onCreate()) as
> follows:
>
>                 getWindow().setBackgroundDrawableResource
> (R.drawable.popup_bg);
>                 getWindow().setLayout(400, 300);
>
> This shows up correctly but there is an issue. This window has a list
> and the minute I select anything in the list, the background
> disappears !
>
> In another case I had a grid and that too disappeared in the same
> manner. In the grid I need not even select an item - If I click
> anywhere in the grid it causes the background that I set to disappear.
> The grid had a color set as the background, not even an image as was
> the case where I had a window with the list and I set the background.
>
> Is this a bug somewhere or do I need to set extra flags or is it some
> sort of optimization like cacheColorHInt in lists?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to