Search in sources :

Example 1 with InstanceListFragment

use of eu.se_bastiaan.popcorntimeremote.fragments.InstanceListFragment in project ButterRemote-Android by se-bastiaan.

the class OverviewActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Fabric.with(this, new Crashlytics());
    if (!PrefUtils.contains(this, "intro")) {
        Intent intent = new Intent(this, IntroActivity.class);
        startActivity(intent);
        finish();
    }
    setContentView(R.layout.activity_framelayout);
    ButterKnife.bind(this);
    setSupportActionBar(toolbar);
    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2) {
        toolbar.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_height_material) + PixelUtils.getStatusBarHeight(this)));
    } else {
        toolbar.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, getResources().getDimensionPixelSize(R.dimen.abc_action_bar_default_height_material)));
    }
    progressBar.setVisibility(View.GONE);
    FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
    fragmentTransaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
    fragmentTransaction.replace(R.id.frameLayout, new InstanceListFragment());
    fragmentTransaction.commit();
}
Also used : FragmentTransaction(android.support.v4.app.FragmentTransaction) RelativeLayout(android.widget.RelativeLayout) Intent(android.content.Intent) InstanceListFragment(eu.se_bastiaan.popcorntimeremote.fragments.InstanceListFragment) Crashlytics(com.crashlytics.android.Crashlytics)

Aggregations

Intent (android.content.Intent)1 FragmentTransaction (android.support.v4.app.FragmentTransaction)1 RelativeLayout (android.widget.RelativeLayout)1 Crashlytics (com.crashlytics.android.Crashlytics)1 InstanceListFragment (eu.se_bastiaan.popcorntimeremote.fragments.InstanceListFragment)1