I want to create an Activity
which shows a sort of menu a user can go through. By clicking an item, a new screen is shown, allowing the user more options (wizard-li
I create this main layout:
And I replenished in the FrameActivity with:
@Override
public void onCreate(Bundle savedInstanceState) {
...
Fragment fragment = new Dashboard();
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction transaction = fm.beginTransaction();
transaction.replace(R.id.contentFragment, fragment);
transaction.commit();
...
}
And I repleace on onClick Method with the same code, changing Fragment (Dashboard for Events):
@Override
public void onClick.... {
...
Fragment fragment = new Events();
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction transaction = fm.beginTransaction();
transaction.replace(R.id.contentFragment, fragment); //Container -> R.id.contentFragment
transaction.commit();
...
}