use of br.ufrj.caronae.frags.AllRidesFrag in project caronae-android by caronae.
the class MainAct method showRidesOfferListFrag.
public void showRidesOfferListFrag() {
backstackSafeCheck();
backstack.remove(AllRidesFrag.class);
backstack.add(AllRidesFrag.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 AllRidesFrag()).commit();
showFilterCard(getBaseContext());
setTitle(getString(R.string.frag_allrides_title));
}
use of br.ufrj.caronae.frags.AllRidesFrag 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