无法在片段的onActivityResult中接收我的数据

问题描述 投票:0回答:1

hi I have a Homefragment that his parent is MainActivity. in my homeFragment I have a listView my problem is that when I send some information to an Activity for editing those information from my listview, i can not receive them in onActivityResult of homeFragment. could you help me??enter image description hereenter image description here

enter image description here

android
1个回答
0
投票

onActivityResult必须在承载片段的父活动中被覆盖。

您可以使用不同的请求代码来区分您想从中获得结果的不同活动,但是它们都在父活动中收到。

© www.soinside.com 2019 - 2024. All rights reserved.