I have a n Array Adapter with a viewHolder.
Inside adapter I implement a imagebutton click listener which opens another activity.
I want to pass an id to the second activity but it says
it cannot resolve method
viewHolder.discounts.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getContext(), Discounts.class);
intent.putExtra(String.valueOf(id));
((Services) getContext()).startActivity(intent);
}
});
How to pass this to another activity?