assertEquals(originalBundle.getDouble(DOUBLE_KEY), cachedBundle.getDouble(DOUBLE_KEY), TestUtils.DOUBLE_EQUALS_DELTA); assertArrayEquals(originalBundle.getDoubleArray(DOUBLE_ARRAY_KEY), cachedBundle.getDoubleArray(DOUBLE_ARRAY_KEY)); assertEquals(originalBundle.getChar(CHAR_KEY), cachedBundle.getChar(CHAR_KEY)); assertArrayEquals(originalBundle.getCharArray(CHAR_ARRAY_KEY), cachedBundle.getCharArray(CHAR_ARRAY_KEY)); assertEquals(originalBundle.getString(STRING_KEY), cachedBundle.getString(STRING_KEY));
public char getChar(String key,char defValue){ if (mBundle != null) { return mBundle.getChar(key, defValue); } return defValue; } public char[] getChars(String key){
public char getChar(Bundle state, String key) { return state.getChar(key + mBaseKey); }
/* here you point to the id of the landscape layout */ int mode = R.layout.graphing; @Override protected void onCreate(Bundle bundle) { super.onCreate(bundle); if ((bundle != null) && (bundle.getChar('O') != null)) { View v=(View)findViewById(mode); setContentView(v); } }
/** * Retrieve extended data from the request. * * @param name The name of the desired item. * @param defaultValue the value to be returned if no value of the desired type is * stored with the given name. * @return the value of an item that previously added with putExtra() or the * default value if none was found. * @see #putExtra(String, char) */ public char getCharExtra(String name, char defaultValue) { return mExtras == null ? defaultValue : mExtras.getChar(name, defaultValue); }
public Character getBoxedChar(Bundle state, String key) { if (state.containsKey(key + mBaseKey)) { return state.getChar(key + mBaseKey); } return null; }
args.putChar(field.getName(), context.getChar(field.getName()));
public static char getCharParam(String name, char defaultValue, Fragment fragment) { if (fragment.getArguments() != null && fragment.getArguments().containsKey(name)) { return fragment.getArguments().getChar(name); } Intent i = fragment.getActivity().getIntent(); try { Uri uri = i.getData(); if (uri != null) { String val = uri.getQueryParameter(name); if (!TextUtils.isEmpty(val)) return val.charAt(0); } } catch (Exception e) { e.printStackTrace(); } return i.getCharExtra(name, defaultValue); }