Due to this feature in ListViews, items cannot gain focus if you want ListView to be able to listen to click events through onItemClick or onListItemClick. Now this is a problem if you want a TextView in an item to be single-lined at the same time. Because if you set android:inputType="text", the TextView somehow becomes “clickable”, thus gaining focus.
I’m currently using android:singleLine="true" as a workaround, but it is listed as depreciated. Are there any “legit” or non-depreciating methods in doing this.
Try……….
android:maxLines