I have a ListView with few elements, each item contains two buttons with a selector so when I’m pressing the buttons the image change.
My problem is when I tap on the some ListView element the buttons on this specific ListView also changing like I pressed the buttons.
Is this a known issue??
Thank’s.
listview xml:
<ListView
android:id="@+id/ViewIndex"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="false"
android:choiceMode="none"
android:fadingEdge="none" >
</ListView>
ListView listView = (ListView) findViewById(R.id.ViewIndex);
listView.setOnItemClickListener(new OnItemClickListener(){
}
I have a custom adapter, that add xml which contain two buttons.
My best guess would be that you are using the onclicklistener of the listview instead of the onclikclisteners of each individual button. If this is the case you should set onclicklisteners for each button and do your actions there.