Ok, I kind of got it together.
 
For the row, I'm setting the background to my bitmap image.
For selection, I'm setting the ListView attribute:
android:listSelector="@drawable/xxx"
 
 
It kind of works. But I can't see the selection.
i.e. when a row is selected (or clicked) I don't see the color change.
This happens when I set the background for the rows.
 
To counter that I tried setting this attr: android:drawSelectorOnTop="true"
 
But the problem with that is that the row contents are completely hidden.
 
What should I do in this case?
 
 

On Monday, April 9, 2012 3:39:13 PM UTC+5:30, Put_tiMe wrote:

> I also need to change the drawable when a listview item is selected.
>  
> How can I achieve this?
>
> On Monday, April 9, 2012 2:19:39 PM UTC+5:30, bin yang wrote:
>
>> Define common list item layout file. 
>> Using  LayoutInflater to create view of Adpater.
>>
>> 在 2012年4月9日 下午4:30,Put_tiMe <[email protected]>写道:
>>
>>> I want to add a background image for each row of a list-view control.
>>> I have written a custom adapter for the list view.
>>>  
>>> What is the best way of doing it?
>>>  
>>>
>>> -- 
>>> 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
>>
>>
>>

-- 
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