EditText对密码的显示与隐藏
显示:edt_pwd.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
隐藏:edt_pwd.setInputType(InputType.TYPE_CLASS_TEXTInputType.TYPE_TEXT_VARIATION_PASSWORD);
动态addView时设置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);