@Override
public void onBindViewHolder(LiveMatchViewHolder holder, final int position) {
liveMatchPOJO currItem = liveMatches.get(position);
holder.tvTeam1.setText(currItem.getTeam1());
holder.tvTeam2.setText(currItem.getTeam2());
// holder.timedate.setText(Integer.toString(currItem.getUniqueid()));
if (prevPos < position) {
//downwards
AnimUtil.animate(holder, true);
}else{
//upwards
AnimUtil.animate(holder, false);
}
holder.itemView.setOnClickListener(v -> {
final Intent i;
i = new Intent(context, Cricket_Categorie.class);
i.putExtra("unique_id", liveMatches.get(position).getUniqueid());
i.putExtra("matchStarted", liveMatches.get(position).getMatchStarted());
i.putExtra("team1",liveMatches.get(position).getTeam1());
i.putExtra("team2",liveMatches.get(position).getTeam2());
context.startActivity(i);
});
prevPos = position;
}
This is my first code through which i send the Intent how can i receive it on second Adapter
how can i recieve it on second Adapter
@Override public void onBindViewHolder(ViewHolder holder, int position) {
final Categories_Data_holder listItem = listItems.get(position);
listItem.getCategories_id();
holder.biography.setText(listItem.getBio());
Picasso.with(context)
.load(listItem.getImageUrl())
.into(holder.imageView);
holder.biography.setText(listItem.getBio());
// Intent i = ((Cricket_Categorie)context).getIntent();
//Setting OnClickListner on Views:-
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent ii = null;
switch (position){
case 0:
ii = new Intent(v.getContext(), Activity.class);
break;
case 1:
ii = new Intent(v.getContext(), ActivityII.class);
break;
}
context.startActivity(ii);
}
});
}
How can I receive text here because through here i need send text to third Activity