diff options
| author | Dianne Hackborn <hackbod@google.com> | 2012-05-29 13:58:13 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2012-06-04 11:12:37 -0700 |
| commit | 80df91c7f2ac155c1cf4c3337f8db5a4bf5426b5 (patch) | |
| tree | c68c4762a2ff2544d04262a2fbcbd0e95724ab3f /samples/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java | |
| parent | 50d57364f97135906e3acd627d8c3327057d4bb4 (diff) | |
New API demos for retained fragments with loaders.
Also tweak the cursor loader samples to filter out query
callbacks that don't change the filter, to avoid restarting the
loader on a configuration change.
Change-Id: Iac9293fed45e127698be59262d68b0b59a8ec9ce
Diffstat (limited to 'samples/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java')
| -rw-r--r-- | samples/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/samples/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java b/samples/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java index e1e77a99b..7c16fb359 100644 --- a/samples/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java +++ b/samples/ApiDemos/src/com/example/android/apis/app/LoaderCustom.java @@ -431,7 +431,8 @@ public class LoaderCustom extends Activity { // Place an action bar item for searching. MenuItem item = menu.add("Search"); item.setIcon(android.R.drawable.ic_menu_search); - item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); + item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM + | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW); SearchView sv = new SearchView(getActivity()); sv.setOnQueryTextListener(this); item.setActionView(sv); |
