本文整理匯總了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();
}
}