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:
Scott Main
2010-08-03 13:54:56 -07:00
parent 721a184e0a
commit 6e9821c667
4 changed files with 7 additions and 7 deletions

View File

@@ -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();