use of qiu.statusbarcompat.fragment.TranslucentFragment in project StatusBarCompat by niorgai.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(null);
setContentView(R.layout.activity_main);
fragments.put(PAGE_COMMON, new CommonFragment());
fragments.put(PAGE_TRANSLUCENT, new TranslucentFragment());
fragments.put(PAGE_COORDINATOR, new DrawerFragment());
fragments.put(PAGE_COLLAPSING_TOOLBAR, new CollapsingToolbarFragment());
mCommon = (RadioButton) findViewById(R.id.common);
mCommon.setOnCheckedChangeListener(this);
mTranslucent = (RadioButton) findViewById(R.id.translucent);
mTranslucent.setOnCheckedChangeListener(this);
mCoordinator = (RadioButton) findViewById(R.id.coordinator);
mCoordinator.setOnCheckedChangeListener(this);
mCollapsingToolbar = (RadioButton) findViewById(R.id.collapsing_toolbar);
mCollapsingToolbar.setOnCheckedChangeListener(this);
FragmentTransaction ft = MainActivity.this.getSupportFragmentManager().beginTransaction();
ft.add(fragmentContentId, fragments.get(PAGE_COMMON));
currentTab = PAGE_COMMON;
mCommon.setTextColor(getResources().getColor(R.color.colorAccent));
ft.commit();
}
Aggregations