在子Fragment操作父Fragment的思路

((FragmentRecyclerBD)FragmentAppointmentBD.this.getParentFragment()).changePageTitle(0,!TextUtils.isEmpty(curSearchContent) ? beanAppointments.size() : 0);//子类


public void changePageTitle(int index,int num){      //父类
if(null != tabLayoutViewPagerAdapter){
switch(index){
case 0:
tabLayoutViewPagerAdapter.setPageTitle(0,(num > 0) ? "预约信息("+num+")" : "预约信息");
break;
case 1:
tabLayoutViewPagerAdapter.setPageTitle(1,(num > 0) ? "收货完成("+num+")" : "收货完成");
break;
default:break;
}//end of switch
}//end of if
}

 

 

相关文章:

  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-06-30
  • 2021-09-14
  • 2022-12-23
猜你喜欢
  • 2021-09-13
  • 2022-01-06
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案