Search in sources :

Example 1 with MainFragment

use of com.facebook.samples.scrollperf.fragments.MainFragment in project fresco by facebook.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SizeUtil.initSizeData(this);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle(R.string.app_name);
    setSupportActionBar(toolbar);
    if (savedInstanceState == null) {
        final MainFragment mainFragment = new MainFragment();
        getSupportFragmentManager().beginTransaction().add(R.id.anchor_point, mainFragment, MainFragment.TAG).commit();
    }
}
Also used : MainFragment(com.facebook.samples.scrollperf.fragments.MainFragment) Toolbar(androidx.appcompat.widget.Toolbar)

Aggregations

Toolbar (androidx.appcompat.widget.Toolbar)1 MainFragment (com.facebook.samples.scrollperf.fragments.MainFragment)1