List of usage examples for android.os Bundle EMPTY
Bundle EMPTY
To view the source code for android.os Bundle EMPTY.
Click Source Link
From source file:Main.java
/** * Invoke "search" action, triggering a default search. *//*from w ww . j a v a 2 s . c o m*/ public static void goSearch(Activity activity) { activity.startSearch(null, false, Bundle.EMPTY, false); }
From source file:cn.studyjams.s2.sj0132.bowenyan.mygirlfriend.nononsenseapps.notepad.ui.common.DialogPasswordSettings.java
public static void showDialog(final FragmentManager fm) { DialogPasswordSettings d = new DialogPasswordSettings(); d.setArguments(Bundle.EMPTY); d.show(fm, "passwordsettings"); }
From source file:cn.studyjams.s2.sj0132.bowenyan.mygirlfriend.nononsenseapps.notepad.ui.common.DialogEditList.java
/** * Use to create new list//w w w . j av a 2s .c o m */ public static DialogEditList getInstance() { DialogEditList dialog = new DialogEditList(); dialog.setArguments(Bundle.EMPTY); return dialog; }
From source file:com.schedjoules.eventdiscovery.framework.serialization.commons.OptionalArgument.java
public OptionalArgument(Key<T> key, Fragment fragment) { this(key, new NullSafe<>(fragment.getArguments()).value(Bundle.EMPTY)); }
From source file:com.savvywits.wethepeople.RESTService.java
@Override protected void onHandleIntent(Intent intent) { Bundle extras = intent.getExtras();/*www.j av a2 s . c o m*/ ResultReceiver receiver = extras.getParcelable("receiver"); String data = extras.getString("zipcode"); String url = ZIP_CODE_BASE + data; Bundle bundle = new Bundle(); receiver.send(STATUS_RUNNING, Bundle.EMPTY); try { String json = EntityUtils.toString(new DefaultHttpClient().execute(new HttpGet(url)).getEntity()); if (!validateJSON(json)) { receiver.send(STATUS_ERROR, Bundle.EMPTY); } else { bundle.putString("rest_result", json); receiver.send(STATUS_FINISHED, bundle); } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { bundle.putString(Intent.EXTRA_TEXT, e.toString()); receiver.send(STATUS_ERROR, bundle); } }
From source file:pl.janusz.hain.socialmediawatcher.FragmentTwitterMainMenu.java
private void displayLicensesAlertDialog() { WebView view = (WebView) getLayoutInflater(Bundle.EMPTY).inflate(R.layout.dialog_licenses, null); view.loadUrl("file:///android_asset/licenses.html"); new AlertDialog.Builder(getActivity()).setView(view).setPositiveButton(android.R.string.ok, null).show(); }
From source file:com.schedjoules.eventdiscovery.framework.serialization.commons.Argument.java
public Argument(Key<T> key, Fragment fragment) { this(key, new NullSafe<>(fragment.getArguments()).value(Bundle.EMPTY)); }
From source file:com.vandalsoftware.filter.PhotoPagerActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final ViewPager viewPager = new ViewPager(this); viewPager.setId(R.id.pager);//from w ww . j a va 2 s .c om viewPager.setPageMargin((int) (getResources().getDisplayMetrics().density * 10)); setContentView(viewPager); setTitle(R.string.app_name); final ActionBar bar = getActionBar(); bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); bar.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE); final TabsAdapter tabsAdapter = new TabsAdapter(this, viewPager); Bundle bundle; bundle = Bundle.EMPTY; tabsAdapter.addTab(bar.newTab().setText(R.string.no_filter), PhotoFragment.class, bundle); bundle = new Bundle(); bundle.putInt(PhotoFragment.ARG_FILTER, PhotoFragment.FILTER_BW); tabsAdapter.addTab(bar.newTab().setText(R.string.bw_filter), PhotoFragment.class, bundle); bundle = new Bundle(); bundle.putInt(PhotoFragment.ARG_FILTER, PhotoFragment.FILTER_CHILL); tabsAdapter.addTab(bar.newTab().setText(R.string.chill_filter), PhotoFragment.class, bundle); bundle = new Bundle(); bundle.putInt(PhotoFragment.ARG_FILTER, PhotoFragment.FILTER_ROSE); tabsAdapter.addTab(bar.newTab().setText(R.string.rose_filter), PhotoFragment.class, bundle); bundle = new Bundle(); bundle.putInt(PhotoFragment.ARG_FILTER, PhotoFragment.FILTER_INVERT); tabsAdapter.addTab(bar.newTab().setText(R.string.invert_filter), PhotoFragment.class, bundle); if (savedInstanceState != null) { bar.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); } }
From source file:com.schedjoules.eventdiscovery.framework.serialization.commons.OptionalArgument.java
public OptionalArgument(Key<T> key, Optional<Bundle> optBundle) { this(key, optBundle.value(Bundle.EMPTY)); }
From source file:com.feedhenry.armark.test.MainActivityTest.java
public void testActivityCallsFHInitOnStartup() throws IOException { getInstrumentation().runOnMainSync(new Runnable() { @Override/*from ww w . j ava 2s . com*/ public void run() { MainActivity activity = startActivity(new Intent(), Bundle.EMPTY, null); activity.onStart(); } }); MainActivity main = getActivity(); Fragment f; while (!((f = main.getSupportFragmentManager().findFragmentById(R.id.content)) instanceof HelloFragment)) { assertTrue("Timeout after 10 seconds", System.currentTimeMillis() - startTime < 10000); } Assert.assertEquals(HelloFragment.class, f.getClass()); main.finish(); }