本文整理汇总了Java中com.google.zxing.integration.android.IntentIntegrator.setTitleByID方法的典型用法代码示例。如果您正苦于以下问题:Java IntentIntegrator.setTitleByID方法的具体用法?Java IntentIntegrator.setTitleByID怎么用?Java IntentIntegrator.setTitleByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.zxing.integration.android.IntentIntegrator
的用法示例。
在下文中一共展示了IntentIntegrator.setTitleByID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIntentIntegrator
import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
private IntentIntegrator getIntentIntegrator() {
IntentIntegrator intentIntegrator = new IntentIntegrator(this);
intentIntegrator.setButtonYesByID(R.string.yes);
intentIntegrator.setButtonNoByID(R.string.no);
intentIntegrator.setTitleByID(R.string.KeyScanningActivity_install_barcode_Scanner);
intentIntegrator.setMessageByID(R.string.KeyScanningActivity_this_application_requires_barcode_scanner_would_you_like_to_install_it);
return intentIntegrator;
}
示例2: onImportMethodSelected
import com.google.zxing.integration.android.IntentIntegrator; //导入方法依赖的package包/类
@Override
public void onImportMethodSelected(String method) {
mInputMethod = method;
if (method.equals("uri")) {
mStep = STEP_URI_INSTRUCTIONS;
handleImportStep();
} else if (method.equals("qr")) {
ArrayList<String> formats = new ArrayList<String>();
formats.add("QR_CODE");
IntentIntegrator ii = new IntentIntegrator(this);
ii.setTitleByID(R.string.qr_prompt_title);
ii.setMessageByID(R.string.qr_prompt_message);
ii.setButtonYesByID(R.string.yes);
ii.setButtonNoByID(R.string.no);
mDialog = ii.initiateScan(formats);
} else if (method.equals("browse")) {
Intent i = new Intent(this, FileSelect.class);
i.putExtra(FileSelect.START_DATA, Environment.getExternalStorageDirectory().getPath());
i.putExtra(FileSelect.NO_INLINE_SELECTION, true);
startActivityForResult(i, REQ_PICK_FILE);
} else if (method.equals("manual")) {
mStep = STEP_MANUAL_ENTRY;
handleImportStep();
}
}