fragment与active通讯
Activity与Fragment之间的传值问题
Activity传值给Fragment
添加Fragment的Activity:
https://blog.csdn.net/xingchenhy/article/details/81356400
方法2
/**
* 想给fragment传id
*
* @return .
*/
public InvoicePhotoEditAllBean getDateId() {
InvoicePhotoEditAllBean bean = new InvoicePhotoEditAllBean();
bean.setStype(mStypes);
bean.setInvoiceId(mInvoiceId);
bean.setContractId(mContractId);
return bean;
}
/*上一页面接受值*/
mStypes = ((InvoicePhotoEditAllActivity) Objects.requireNonNull(getActivity())).getDateId().getStype();