討論串[問題] 請問取得先前使用的fragment?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者yrulee (Face the truth.)時間11年前 (2014/10/10 06:40), 編輯資訊
0
0
5
內容預覽:
以下 ft 代表 FragmentTransaction, fm 代表 FragmentManager. 1. 加入fragment時,使用 ft.add(viewID, fragment, tag). 2. 替換fragment時,使用 ft.detach() ,此fragment的onDestr
(還有466個字)

推噓3(3推 0噓 3→)留言6則,0人參與, 最新作者htury (冰點)時間11年前 (2014/09/25 09:28), 11年前編輯資訊
0
0
3
內容預覽:
我發現為什麼取的null了. 因為getChildFragmentManager. 這時候是FragmentB的manager而不是FragmentA的. 然後我先設個static 指向FragmentA. 也順利取的FragmentA上的CalendarFragment. 想要放到Fragment
(還有1799個字)
首頁
上一頁
1
下一頁
尾頁