[英]How to put diffrent values depending on the item clicked in the recyclerview
when I click on each item of the recyclerview I want to go to another activity but the values in the activity will be different depending on the item clicked in the recyclerview.当我单击 recyclerview 的每个项目时,我想将 go 转移到另一个活动,但活动中的值会根据在 recyclerview 中单击的项目而有所不同。
For example: If I have a list of TV shows and when I click on each item it will go to the same activity and show me different episodes list.例如:如果我有一个电视节目列表,当我单击每个项目时,它将 go 到相同的活动并显示不同的剧集列表。
Anyone can help how to achieve this?任何人都可以帮助如何实现这一目标?
Android Studio provides you with various project templates when creating a new project, If you have a look at the one described as Master/Detail Flow
. Android Studio 在创建新项目时为您提供各种项目模板,如果您查看描述为
Master/Detail Flow
的模板。
This will give you some working code that should cover your use case, which when comfortable that you understand it, you can then begin to implement into your own project.这将为您提供一些应该涵盖您的用例的工作代码,当您理解它时,您可以开始实施到您自己的项目中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.