[android]控件Button常用属性

代码中常用属性:

Button bt=new Buttion(Context context);

bt.setText();---为控件设置文本内容


xml中常用属性:

android:layout_width=""---控件宽

android:layout_height=""---控件高

android:layout_weight=""---控件权重

android:text=""---控件上的文本内容

android:onClick="doClick"---点击此控件时调用的方法---方法名称为:doClick

android:drawableTop=""---在Button组件上放置图片

你可能感兴趣的:([tarena]android,android,button,layout,bt,xml)