本文整理了Java中android.os.Bundle.getChar()
方法的一些代码示例,展示了Bundle.getChar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.getChar()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:getChar
暂无
代码示例来源:origin: konmik/nucleus
when(bundle.getChar(anyString())).thenAnswer(get);
when(bundle.getChar(anyString(), anyChar())).thenAnswer(getOrDefault);
代码示例来源:origin: facebook/facebook-android-sdk
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));
代码示例来源:origin: kayoSun/Tack
public char getChar(String key,char defValue){
if (mBundle != null) {
return mBundle.getChar(key, defValue);
}
return defValue;
}
public char[] getChars(String key){
代码示例来源:origin: evernote/android-state
public char getChar(Bundle state, String key) {
return state.getChar(key + mBaseKey);
}
代码示例来源:origin: stackoverflow.com
/* 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);
}
}
代码示例来源:origin: fengdai/FragmentMaster
/**
* 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);
}
代码示例来源:origin: evernote/android-state
public Character getBoxedChar(Bundle state, String key) {
if (state.containsKey(key + mBaseKey)) {
return state.getChar(key + mBaseKey);
}
return null;
}
代码示例来源:origin: Nimrodda/WizarDroid
args.putChar(field.getName(), context.getChar(field.getName()));
代码示例来源:origin: Meituan-Dianping/Shield
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);
}
内容来源于网络,如有侵权,请联系作者删除!