You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the problem is that the view is already generated after it goes through the simple cardstackadapter, what you should do is change the code bellow and adapt it to the button, so it can be changed dynamically
Hi,
I want to change the image of the imagebutton when I click on it (The image button of camera and people which are placed below picture).
I have added the imagebutton listener in SimpleCardStackAdapter.java:
cardHolder.mLikeButton.setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
Log.i("Sushil", "clicked like button!!!!!");
updateHeartButton(true);
}
});
When I click on the button, my listener is called and from inside I call a method to update the image of button:
private void updateHeartButton(boolean animated) {
cardHolder.mLikeButton.setImageResource(R.drawable.ic_heart_red);
}
But the imagebutton does not get updated with new image. can someone help me.
Thank You
The text was updated successfully, but these errors were encountered: