Re: [android-developers] List view row background.

2012-04-09 Thread Put_tiMe
I have another issue that I'm facing. I have registered for a callback on item click. Whenever I click on a row, it remains selected. I want to clear the selection. How do I do it? I tried various functions, but none of them worked. On Monday, April 9, 2012 4:01:43 PM UTC+5:30, Put_tiMe wr

Re: [android-developers] List view row background.

2012-04-09 Thread Put_tiMe
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 ch

Re: [android-developers] List view row background.

2012-04-09 Thread Put_tiMe
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 写道: > >> I want t

Re: [android-developers] List view row background.

2012-04-09 Thread Farhan Tariq
In the getView method of the adapter, use the index of the row to set background to. Suppose every row is a textView, then textView.setBackgroundColor(Color.BLACK) would do the trick. For different indices, you could do this... public View getView(int index, View convertView, ViewGroup parent) {

Re: [android-developers] List view row background.

2012-04-09 Thread Bin Yang
Define common list item layout file. Using LayoutInflater to create view of Adpater. 在 2012年4月9日 下午4:30,Put_tiMe 写道: > 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 r

[android-developers] List view row background.

2012-04-09 Thread Put_tiMe
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