EditText對(duì)密碼的顯示與隱藏
創(chuàng)新互聯(lián)主營(yíng)河北網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,重慶APP開發(fā),河北h5小程序定制開發(fā)搭建,河北網(wǎng)站營(yíng)銷推廣歡迎河北等地區(qū)企業(yè)咨詢
顯示:edt_pwd.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
隱藏:edt_pwd.setInputType(InputType.TYPE_CLASS_TEXTInputType.TYPE_TEXT_VARIATION_PASSWORD);
動(dòng)態(tài)addView時(shí)設(shè)置padding和margin值
ImageView img = new ImageView(Context context);
img.setPadding(left,top,right,bottom);
margin:
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
width, height);
params.setMargins(left,top,right,bottom);