简体   繁体   English

如何根据在回收站视图中单击的项目放置不同的值

[英]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.

相关问题 如何根据RecyclerView中的单击项在新活动中打开特定片段 - How to open specific Fragment in new Activity depending on clicked item in RecyclerView 如何在Android RecyclerView中获取单击项的文本 - How to get the text of clicked item in android recyclerview 如何在RecyclerView中获取被单击项的位置 - How to get position of clicked item in RecyclerView 单击第一个 RecyclerView 中的项目时,如何将数据从一个 RecyclerView 流向另一个 RecyclerView? - How to flow Data from One RecyclerView to Another RecyclerView when an item in first RecyclerView is clicked? 如何根据所选项目更改 RecyclerView 下面的信息? - How can I change the info below a RecyclerView depending of the item selected? 单击RecyclerView项时发生NullPointerException - NullPointerException when RecyclerView item is clicked 在Firebase RecyclerView Cardview中单击项目时如何打开详细信息活动 - How to open a details activity when an item is clicked in Firebase RecyclerView Cardview 单击recyclerView Item时如何将数据获取到webView活动中 - how to get data into webView activity when recyclerView Item is clicked 在recyclerView中获取选中的item或者被点击的item - Get the selected item or the item that is being clicked in the recyclerView 如何从 ArrayList 检索值并将它们放在 Android Studio 中的不同 TextViews 中? - How to retrive values from ArrayList and put them in diffrent TextViews in Android Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM