如何在 Fragment 的 Adapter 和新 Fragment 之间建立通信?
How to Establish Communication between Fragment's Adapter and New Fragment?
片段
我创建了带有两个选项卡的选项卡 Activity。
Fragment 1
片段1将数据保存到sqlite数据库
Fragment 2
检索所有数据并在回收站视图中显示
问题:当用户单击 查看用户按钮 时,用户详细信息应该在 NewFragment 上完全可见 screen.But 我不知道如何使用片段事务传递数据
使用 Bundle 在片段事务期间传递数据是很好的解决方案。
片段
我创建了带有两个选项卡的选项卡 Activity。
Fragment 1 片段1将数据保存到sqlite数据库
Fragment 2 检索所有数据并在回收站视图中显示
问题:当用户单击 查看用户按钮 时,用户详细信息应该在 NewFragment 上完全可见 screen.But 我不知道如何使用片段事务传递数据
使用 Bundle 在片段事务期间传递数据是很好的解决方案。