[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-12-10 Thread Miguel Barrios
As Romain said, top-level View has to be Checkable. A solution could be to make a custom container implementing Checkable interface, then use that container as top-level View for your row. Overriden methods just call analog methods in Checkable item inside the container. Example: public class

[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-10-25 Thread Jason Van Anden
Does anyone know if this thread ended well? I attempting to create a fancy list with a multiple selection (in 1.6). The following code give seemingly random results using a SimpleCursorAdapter ... @Override protected void onListItemClick(ListView l, View v, int position, long id) {

[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-10-25 Thread Jason Van Anden
OK. I am an idiot. This was not working for me because I had left-over code in onCreate from something else I tried: //listView.setItemsCanFocus(false); //listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); In the process I learned an awful lot from Mark Murphy's examples in

[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-02-16 Thread Romain Guy
@Romain- Thanks for responding. setChoiceMode is set to Mutiple choice. But it doesnt check the row. Thats why I am manually trying it. That's because the top-level View in your item has to be Checkable. It's a current limitation of ListView :( On Feb 16, 4:12 am, Mark Murphy

[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-02-15 Thread Mark Murphy
Shams wrote: Hello, I have a custom multi-select listview with two lines per row and a checkbox in the first line. When I click on the checkbox, the checbox does not get checked. But the list items get checked/ unchecked. I want to check the checkbox corresponding to the row I clicked. If I

[android-beginners] Re: Unable to check correct row when using CheckedTextView

2009-02-15 Thread Romain Guy
Do not handle the checked state yourself. ListView recyles the view which can cause trouble. Lookup setChoiceMode() instead and refer to the ApiDemos for examples. On Sun, Feb 15, 2009 at 5:42 AM, Shams shammi.theod...@gmail.com wrote: Hello, I have a custom multi-select listview with two