change fragment stack button from "next" to "new fragment"
also move text in the dialog demo to the top to make dialogs easier to read Change-Id: I76c44f773098e64c79465060efb4bb6edab1fa3a
This commit is contained in:
@@ -38,15 +38,15 @@ public class FragmentStack extends Activity {
|
||||
setContentView(R.layout.fragment_stack);
|
||||
|
||||
// Watch for button clicks.
|
||||
Button button = (Button)findViewById(R.id.next);
|
||||
Button button = (Button)findViewById(R.id.new_fragment);
|
||||
button.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
addFragmentToStack();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
// Do first time initialization -- add initial fragment.
|
||||
// Do first time initialization -- add initial fragment.
|
||||
Fragment newFragment = new CountingFragment(mStackLevel);
|
||||
FragmentTransaction ft = openFragmentTransaction();
|
||||
ft.add(R.id.simple_fragment, newFragment).commit();
|
||||
|
||||
Reference in New Issue
Block a user