本文整理了Java中android.os.Bundle.clear()
方法的一些代码示例,展示了Bundle.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.clear()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:clear
暂无
代码示例来源:origin: jiajunhui/PlayerBase
private void recycleBundle(Bundle bundle){
if(bundle!=null)
bundle.clear();
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected static void cancelSync(Account account, String authority) {
Status status = getStatus(account, authority);
if (status != null) {
status.syncRequests = 0;
if (status.syncExtras != null) {
status.syncExtras.clear();
}
// This may be too much, as the above should be sufficient.
if (status.syncs != null) {
status.syncs.clear();
}
}
}
代码示例来源:origin: robolectric/robolectric
@Test
public void clear() {
bundle.putFloat("foo", 5f);
bundle.clear();
assertThat(bundle.size()).isEqualTo(0);
}
代码示例来源:origin: robolectric/robolectric
Bundle extras = intent.getExtras();
if (extras != null) {
extras.clear();
代码示例来源:origin: konmik/nucleus
return null;
}).when(bundle).clear();
doAnswer(new Answer() {
@Override
代码示例来源:origin: ukanth/afwall
bundle.clear();
return true;
代码示例来源:origin: limpoxe/Android-Plugin-Framework
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
if (savedInstanceState != null) {
savedInstanceState.clear();
}
super.onRestoreInstanceState(savedInstanceState);
}
代码示例来源:origin: stackoverflow.com
@Override
protected void onSaveInstanceState(Bundle savedInstanceState)
{
savedInstanceState.clear();
}
代码示例来源:origin: stackoverflow.com
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.clear();
}
代码示例来源:origin: andstatus/andstatus
/**
* Forget stored state
*/
void forget() {
authenticatorResponse = null;
StateOfAccountChangeProcess.STORED_STATE.clear();
}
代码示例来源:origin: stackoverflow.com
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.clear();
}
代码示例来源:origin: JakePrim/PrimPlayerCC
private void bundleClear(Bundle bundle) {
if (bundle != null) {
bundle.clear();
}
}
}
代码示例来源:origin: stackoverflow.com
Bundle extras = getIntent().getExtras();
if (extras == null) {
return;
}
String value1 = extras.getString("Value1");
String value2 = extras.getString("Value2");
extras.clear();
代码示例来源:origin: stackoverflow.com
public void setBundle(final Bundle bundle) {
final Bundle arguments = getArguments();
arguments.clear();
arguments.putAll(bundle);
}
代码示例来源:origin: LiqiNew/MyUtils
/**
* 清空掉intent里面存储的数据
*/
private void clearIntent() {
mIntent.setFlags(0);
Bundle extras = mIntent.getExtras();
if (null != extras && !extras.isEmpty())
extras.clear();
}
}
代码示例来源:origin: org.robolectric/shadows-core-v23
@Implementation
public static void cancelSync(Account account, String authority) {
Status status = getStatus(account, authority);
if (status != null) {
status.syncRequests = 0;
if (status.syncExtras != null) {
status.syncExtras.clear();
}
// This may be too much, as the above should be sufficient.
if (status.syncs != null) {
status.syncs.clear();
}
}
}
代码示例来源:origin: org.robolectric/shadows-framework
@Implementation
protected static void cancelSync(Account account, String authority) {
Status status = getStatus(account, authority);
if (status != null) {
status.syncRequests = 0;
if (status.syncExtras != null) {
status.syncExtras.clear();
}
// This may be too much, as the above should be sufficient.
if (status.syncs != null) {
status.syncs.clear();
}
}
}
代码示例来源:origin: org.robolectric/framework
@Implementation
public static void cancelSync(Account account, String authority) {
Status status = getStatus(account, authority);
if (status != null) {
status.syncRequests = 0;
if (status.syncExtras != null) {
status.syncExtras.clear();
}
// This may be too much, as the above should be sufficient.
if (status.syncs != null) {
status.syncs.clear();
}
}
}
代码示例来源:origin: andstatus/andstatus
/**
* Store the state of the not completed actions in the global static object
* or forget old state of completed action
*/
void save() {
if (actionCompleted) {
forget();
} else {
StateOfAccountChangeProcess.STORED_STATE.clear();
save(StateOfAccountChangeProcess.STORED_STATE);
}
}
代码示例来源:origin: AndroidHardening/PdfViewer
public static DocumentPropertiesFragment getInstance(final ArrayList<CharSequence> metaData) {
if (sDocumentPropertiesFragment == null) {
sDocumentPropertiesFragment = new DocumentPropertiesFragment();
final Bundle args = new Bundle();
args.putCharSequenceArrayList(KEY_DOCUMENT_PROPERTIES, metaData);
sDocumentPropertiesFragment.setArguments(args);
} else {
final Bundle args = sDocumentPropertiesFragment.getArguments();
args.clear();
args.putCharSequenceArrayList(KEY_DOCUMENT_PROPERTIES, metaData);
}
return sDocumentPropertiesFragment;
}
内容来源于网络,如有侵权,请联系作者删除!