Android ListView when Items are Focusable,disables clicks?

Along with android:focusable, use this on TextView android:duplicateParentState="true Make sue your list items are focusable and clickable.

Along with android:focusable, use this on TextView android:duplicateParentState="true" Make sue your list items are focusable and clickable.

Nope not working. All the items are in focused state now. ListView is the only view in my layout i.e.

Width and height set to fill_parent – Shardul Dec 31 '10 at 9:52 @Shardul: You mean you have multiple list items selected at once? – Sarwar Erfan Dec 31 '10 at 9:54 No when acitivity starts all items have background which resembles focused background specified in my selector. And still neither item is responding to clicks.

– Shardul Dec 31 '10 at 9:58 Aren't you putting your TextView in a LinearLayout or RelativeLayout? Seems like so. If you directly use the TextView as item template, all items gets focused state (using duplicateParentState) and, the second last item in your statelist is the first match and all is shown as selected.

From SDK documentation "During each state change, the state list is traversed top to bottom and the first item that matches the current state is used—the selection is not based on the "best match," but simply the first item that meets the minimum criteria of the state. " – Sarwar Erfan Dec 31 '10 at 12:58.

It is then I see my focused version of background, but setting these causes list items to no more respond to clicks and long clicks. When these 2 properties are removed all ListItems respond to clicks and long clicks. What should be done which would make focusable background visible and click responds both to work.

I have tried calling getListView(). SetItemsCanFocus(true) but problems still persists.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions