selectItem(MyCardFragment.newInstance(), getResources().getString(R.string.navbar_mycard));
private void selectItem(Fragment fragment, String title) {
actionBar.setTitle(title);
fragmentTransaction.setCustomAnimations(R.anim.fragment_slide_left_enter, R.anim.fragment_slide_left_exit,
R.anim.fragment_slide_right_enter, R.anim.fragment_slide_right_exit);
fragmentTransaction.replace(R.id.content_frame, fragment).commit();
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
drawer.closeDrawer(GravityCompat.START);
}
public static MyCardFragment newInstance() {
return new MyCardFragment();
}