use of br.ufrj.caronae.frags.MyRidesFrag in project caronae-android by caronae.
the class MainAct method showActiveRidesFrag.
public void showActiveRidesFrag() {
backstackSafeCheck();
backstack.remove(MyRidesFrag.class);
backstack.add(MyRidesFrag.class);
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction transaction = fragmentManager.beginTransaction();
transaction.setCustomAnimations(R.anim.anim_fade_in, R.anim.anim_fade_out);
transaction.replace(R.id.flContent, new MyRidesFrag()).commit();
hideFilterCard(getBaseContext());
setTitle(getString(R.string.frag_myactiverides_title));
}
use of br.ufrj.caronae.frags.MyRidesFrag in project caronae-android by caronae.
the class MainAct method onStart.
@Override
protected void onStart() {
super.onStart();
User user = App.getUser();
Fragment fragment;
boolean goToMyRides = getIntent().getBooleanExtra(SharedPref.MY_RIDE_LIST_KEY, false);
if (user.getEmail() == null || user.getEmail().isEmpty() || user.getPhoneNumber() == null || user.getPhoneNumber().isEmpty() || user.getLocation() == null || user.getLocation().isEmpty()) {
fragment = new MyProfileFrag();
Util.toast(getString(R.string.act_main_profileIncomplete));
} else if (goToMyRides) {
fragment = new MyRidesFrag();
backstack.add(new AllRidesFrag().getClass());
} else {
fragment = new AllRidesFrag();
}
FragmentManager fragmentManager = getSupportFragmentManager();
fragmentManager.beginTransaction().replace(R.id.flContent, fragment).commit();
backstack.add(fragment.getClass());
}
Aggregations