Exemplo n.º 1
0
  private void startBasicFragment() {
    int position = mLeftMenuLV.getCheckedItemPosition();
    int iCourseID = mSelectedCourses.get(position).getICourseID();
    mCurType = TYPE_BASE;
    CourseBaseFragment courseBaseFragment = CourseBaseFragment.newInstance(iCourseID);
    FragmentManager fragmentManager = getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.content_frame, courseBaseFragment).commit();

    this.setTitle(
        mSelectedCourses.get(position).getStrCourseName() + ":" + getString(R.string.basic_test));
  }
Exemplo n.º 2
0
  private void changeCourse(int position) {
    int iCourseID = mSelectedCourses.get(position).getICourseID();
    mCurType = TYPE_BASE;
    CourseBaseFragment courseBaseFragment = CourseBaseFragment.newInstance(iCourseID);
    FragmentManager fragmentManager = getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(R.id.content_frame, courseBaseFragment).commit();
    mDrawerLayout.closeDrawer(mRelativeLayoutLeftMenu);

    mLeftMenuLV.setItemChecked(position, true);
    this.setTitle(
        mSelectedCourses.get(position).getStrCourseName() + ":" + getString(R.string.basic_test));
  }