views:

21

answers:

1

Hi,

I've made a ListActivity. I have an xml file that defines the layout for this Activity. I also have an xml file that defines the layout for an item in that list. This item layout has 3 TextViews inside of it. If I add the inputType="text" property to one of these TextViews, the onListItemClick handler no longer executes when I run my application in the emulator.

I noticed that singleLine="true" was deprecated, which is why I switched it out for inputType="text". Does anyone know why this is happening?

Note: I'm developing against 2.1

Thanks for your help

A: 

Setting an inputType probably causes the TextView to be focusable , and when you have a focusable element in a ListView row, the row is no longer clickable.

InputType has to do with users entering text. The equivalent to singleLine="true" would be lines="1", not inputType="text"

Mayra
Thank you, I understand now :D It threw me off because when I type :singleLine inside TextView XML I get a tooltip telling me to use inputType
Andrew