简体   繁体   English

在Android的导航抽屉中从一个片段获取数据到另一个片段

[英]get data from one fragment to another fragment in navigation drawer in android

I develop one android app with navigation drawer.in that navigation drawer using fragment for each item pages. 我使用导航抽屉开发了一个Android应用程序。在该导航抽屉中,每个项目页面均使用片段。 I want to get data from one fragment to another fragment in navigation drawer. 我想从导航抽屉中的一个片段到另一个片段获取数据。 How to solve this task? 如何解决这个任务?

It does not matter if it is in Navigation Drawer. 它是否在导航抽屉中都没有关系。 Use the same method to pass data between fragments as in developer docs 使用与开发人员文档中相同的方法在片段之间传递数据

https://developer.android.com/training/basics/fragments/communicating.html https://developer.android.com/training/basics/fragments/communicating.html

other link as mentioned in comments seems good too 评论中提到的其他链接似乎也很好

https://www.google.co.in/amp/s/www.journaldev.com/14207/andr ‌​oid-passing-data-bet‌​ween-fragments/amp https://www.google.co.in/amp/s/www.journaldev.com/14207/andr oidoid-passing-data-bet‌fragments / amp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM