2012-11-28 110 views

回答

2

這裏是通過Java代碼來生成的EditText代碼

EditText edTxt = new EditText(this); 

     edTxt.setInputType(InputType.TYPE_CLASS_TEXT); 
     edTxt.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, 
       LayoutParams.MATCH_PARENT)); 
     edTxt.setHint("Enter data"); 
     myLayout.addView(edTxt); 
相關問題