I have horizontal listView with TextView items, my item layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayHorizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?android:attr/activatedBackgroundIndicator">
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="35dp" >
</TextView>
<View
android:layout_width="5dp"
android:layout_height="35dp"/>
</LinearLayout>
I want to highlight only one selected item by setting borded to it's textView, eg. when I click to item1 I want to see this item with small border, and now when I click item2 - this will be highlighted and border from item1 will disappear.
Any ideas ?
Thanks in advance!
ListView.getSelected()
which should return the list item view you want to highlight, find theTextView
in it, change border and remember it to reset border when another item is selected – Michael Butscher Aug 6 '13 at 10:03