[英]How to transfer data from tabs view fragments to a parent fragment
聲明界面,例如:
interface FragmentInteractor{
public void sendData(...);
}
然后讓您的父片段實現此接口。 一次,用戶單擊子片段中的按鈕,獲取父片段並將其轉換為FragmentInteractor
(FragmentInteractor)(getParent()).sendData(...);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.