I have list of cards in gridview all are static i want to add onclick to each card and open a link in webview when clicked different link for different card.
Asked
Active
Viewed 776 times
-3
-
2describe your question, show some code – Mohd Asif Ahmed Dec 28 '17 at 10:22
-
i removed code something like inside of gridlayout i added 10cardviews into 2columns each card will have image and when i click on image or card it should open link in webview. – sampathsuny Dec 28 '17 at 11:56
1 Answers
0
https://antonioleiva.com/recyclerview-listener/
use this for reference for onclick item of recyclerview.
NOTE
below sentence will be understood, only when you follow the above link
Now after doing all the steps, you will have a method in Activity after implementing the interface. pass the position to the method.
In that method, add switch case, based on position you got, call the webview with that particular uri.

Mohd Asif Ahmed
- 1,880
- 2
- 15
- 29