I have an ImageButton
in my child xml layout like this:
<ImageButton
android:id="@+id/favoriteButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/citrus_orange"
android:paddingLeft="@dimen/feed_item_padding_left_right"
android:background="@null"
andorid:onClick="flipVote"/>
I programmatically make this button non-focusable in my adapter:
ImageButton favButton = (ImageButton) convertView.findViewById(R.id.favoriteButton);
favButton.setFocusable(false);
In the same layout, I have a TextView
like:
<TextView
android:id="@+id/store_id"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:visibility="gone" />
The click will call the flipVote(View view)
method:
public void flipVote(View view) {
// make a network call with the value from store_id
}
How do I get the value from the TextView
associated with the clicked button to include with the network call?