android.content.Intent.getBooleanArrayExtra()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(180)

本文整理了Java中android.content.Intent.getBooleanArrayExtra()方法的一些代码示例,展示了Intent.getBooleanArrayExtra()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Intent.getBooleanArrayExtra()方法的具体详情如下:
包路径:android.content.Intent
类名称:Intent
方法名:getBooleanArrayExtra

Intent.getBooleanArrayExtra介绍

暂无

代码示例

代码示例来源:origin: pockethub/PocketHub

/**
 * Get intent extra
 *
 * @param name
 * @return boolean array
 */
protected boolean[] getBooleanArrayExtra(final String name) {
  return getIntent().getBooleanArrayExtra(name);
}

代码示例来源:origin: Rukey7/MvpApp

@Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == CommonConstant.REQUEST_CODE && resultCode == RESULT_OK) {
      final boolean[] delLove = data.getBooleanArrayExtra(CommonConstant.RESULT_KEY);
      // 延迟 500MS 做删除操作,不然退回来看不到动画效果
      new Handler().postDelayed(new Runnable() {
        @Override
        public void run() {
          for (int i = delLove.length - 1; i >= 0; i--) {
            if (delLove[i]) {
              mAdapter.removeItem(i);
            }
          }
        }
      }, 500);
    }
  }
}

代码示例来源:origin: JackWHLiu/jackknife

public static boolean[] getBooleanArrayExtra(Intent intent, String name) {
  if (intent != null || !hasExtra(intent, name)) return null;
  return intent.getBooleanArrayExtra(name);
}

代码示例来源:origin: xiaolongonly/Ticket-Analysis

public static boolean[] getBooleanArrayExtra(Intent intent, String name) {
  if (!hasIntent(intent) || !hasExtra(intent, name)) return null;
  return intent.getBooleanArrayExtra(name);
}

代码示例来源:origin: TellH/AutoGo

return checkNull(intent.getIntArrayExtra(key), defValue);
} else if ("boolean[]".equals(type)) {
  return checkNull(intent.getBooleanArrayExtra(key), defValue);
} else if ("char[]".equals(type)) {
  return checkNull(intent.getCharArrayExtra(key), defValue);

代码示例来源:origin: PeterCxy/Shelter

boolean[] packagesShouldFreeze = getIntent().getBooleanArrayExtra("linkedPackagesShouldFreeze");

相关文章

Intent类方法