public class TaskFragment extends Fragment { //重写onCreateView, fragment绑定布局文件 @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.task_fragment, container, false); return view; } } 5.在MainActivity.java中进行设置BottomNavigation选择监听事件对fragment进行管理。 public List fragmentList = new ArrayList<>(); private FragmentManager fragmentManager; // 底部导航栏模块 public void...