/** {@inheritDoc} */
@Override
protected View createView(Context c) {
et = new EditText(c);
et.setText(answer);
et.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
et.setGravity(Gravity.CENTER_HORIZONTAL);
et.setKeyListener(new DialerKeyListener());
LinearLayout ll = new LinearLayout(c);
ll.setOrientation(LinearLayout.VERTICAL);
ll.addView(et, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
ll.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT));
//SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(c);
boolean barcodeEnable = true; //sp.getBoolean(Constants.PREFERENCE_BARCODE_ENABLED, false);
if (barcodeEnable) {
barcodeButton = new Button(c);
barcodeButton.setText(c.getResources().getString(
R.string.procedurerunner_scan_id));
barcodeButton.setOnClickListener(this);
barcodeButton.setGravity(Gravity.CENTER_HORIZONTAL);
ll.addView(barcodeButton, new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
}
return encapsulateQuestion(c, ll);
}
PatientIdElement.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:vit-04
作者:
评论列表
文章目录