Noureddine
Noureddine

Reputation: 3

How can I getIntent from ViewHolder in RecyclerView ?

I have to get data from another Activity and set my text to those data in my onBindViewHolder, how can I do that, any ideas ?

Upvotes: 0

Views: 1942

Answers (2)

Murtuza Saifee
Murtuza Saifee

Reputation: 67

I found this useful code of RecyclerView. Might it will help others. It is complete working example.

http://inducesmile.com/android/android-staggeredgridlayoutmanager-example-tutorial/

Upvotes: 0

R. Adang
R. Adang

Reputation: 603

When creating the adapter, send your Activity as context.

Then

adapter(Activity context); 
..
context.getIntent();
..

Upvotes: 1

Related Questions