RelativeLayout blur = (RelativeLayout) findViewById(R.id.relative5);
TextView name_tv = new TextView (this);
name_tv.setText("\n\n First Name");
blur.addView(name_tv);
Typeface font=Typeface.SERIF;
name_tv.setTypeface(font);
final EditText nameedit = new EditText(this);
nameedit.setHint("First name");
blur.addView(nameedit);
Typeface font33=Typeface.SERIF;
nameedit.setTypeface(font33);
nameedit.setMaxLines(1);
nameedit.setImeOptions(EditorInfo.IME_ACTION_NEXT);
nameedit.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
同样地,我在这个类中动态添加了几个文本视图和编辑文本。问题是当我在xml中添加scrollview时它显示错误.....