diff options
Diffstat (limited to 'docs/html/guide/topics')
| -rw-r--r-- | docs/html/guide/topics/data/backup.jd | 5 | ||||
| -rw-r--r-- | docs/html/guide/topics/ui/actionbar.jd | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/docs/html/guide/topics/data/backup.jd b/docs/html/guide/topics/data/backup.jd index 4903852..f09ff9e 100644 --- a/docs/html/guide/topics/data/backup.jd +++ b/docs/html/guide/topics/data/backup.jd @@ -899,8 +899,9 @@ Play built in.</li> {@code tools/} path: <pre class="no-pretty-print">adb shell bmgr enable true</pre> </li> - <li>If using a device, open the system <b>Settings</b>, select <b>Privacy</b>, then enable -<b>Back up my data</b> and <b>Automatic restore</b>. + <li>If using a device, open the system <b>Settings</b>, select + <b>Backup & reset</b>, then enable + <b>Back up my data</b> and <b>Automatic restore</b>.</li> </ul> </li> <li>Open your application and initialize some data diff --git a/docs/html/guide/topics/ui/actionbar.jd b/docs/html/guide/topics/ui/actionbar.jd index 3173ff1..f01d4bf 100644 --- a/docs/html/guide/topics/ui/actionbar.jd +++ b/docs/html/guide/topics/ui/actionbar.jd @@ -1126,8 +1126,8 @@ android.widget.SpinnerAdapter} by using {@link android.widget.ArrayAdapter} impl uses a string array as the data source:</p> <pre> -SpinnerAdapter mSpinnerAdapter = ArrayAdapter.createFromResource(this, R.array.action_list, - android.R.layout.simple_spinner_dropdown_item); +SpinnerAdapter mSpinnerAdapter = ArrayAdapter.createFromResource(this, + R.array.action_list, android.R.layout.simple_spinner_dropdown_item); </pre> <p>The {@link android.widget.ArrayAdapter#createFromResource createFromResource()} method takes @@ -1145,7 +1145,7 @@ defined in a resource looks like this:</p> <item>Venus</item> <item>Earth</item> </string-array> -</pre> +</resources> </pre> <p>The {@link android.widget.ArrayAdapter} returned by {@link @@ -1179,10 +1179,13 @@ mOnNavigationListener = new OnNavigationListener() { public boolean onNavigationItemSelected(int position, long itemId) { // Create new fragment from our own Fragment class ListContentFragment newFragment = new ListContentFragment(); - FragmentTransaction ft = openFragmentTransaction(); + FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); + // Replace whatever is in the fragment container with this fragment - // and give the fragment a tag name equal to the string at the position selected + // and give the fragment a tag name equal to the string at the position + // selected ft.replace(R.id.fragment_container, newFragment, strings[position]); + // Apply changes ft.commit(); return true; @@ -1210,7 +1213,8 @@ public class ListContentFragment extends Fragment { @Override public void onAttach(Activity activity) { // This is the first callback received; here we can set the text for - // the fragment as defined by the tag specified during the fragment transaction + // the fragment as defined by the tag specified during the fragment + // transaction super.onAttach(activity); mText = getTag(); } |
