backStackに追加するように
This commit is contained in:
parent
953f3b81d0
commit
349cc04e99
|
@ -117,10 +117,12 @@ public class MainActivity extends AppCompatActivity {
|
||||||
} else if (v.getItemId() == findViewById(R.id.navigation_notification).getId()) {
|
} else if (v.getItemId() == findViewById(R.id.navigation_notification).getId()) {
|
||||||
getSupportFragmentManager().beginTransaction()
|
getSupportFragmentManager().beginTransaction()
|
||||||
.replace(findViewById(R.id.fragmentContainerView).getId(), NotificationFragment.newInstance("test", "test"))
|
.replace(findViewById(R.id.fragmentContainerView).getId(), NotificationFragment.newInstance("test", "test"))
|
||||||
|
.addToBackStack(null)
|
||||||
.commit();
|
.commit();
|
||||||
} else if (v.getItemId() == findViewById(R.id.navigation_settings).getId()) {
|
} else if (v.getItemId() == findViewById(R.id.navigation_settings).getId()) {
|
||||||
getSupportFragmentManager().beginTransaction()
|
getSupportFragmentManager().beginTransaction()
|
||||||
.replace(findViewById(R.id.fragmentContainerView).getId(), SettingFragment.newInstance())
|
.replace(findViewById(R.id.fragmentContainerView).getId(), SettingFragment.newInstance())
|
||||||
|
.addToBackStack(null)
|
||||||
.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user