[android]控件Button常用属性
16lz
2021-01-23
代码中常用属性:
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组件上放置图片
更多相关文章
- android:screenOrientation属性
- Android相对布局属性全集
- Android layout常见的属性大全
- TextView之二:常用属性
- Android TextView跑马灯不动 及属性
- Android 布局各个属性的含义
- Android 控件view的可见,不可见,隐藏的设置和区别
- android xml属性大全
- Android:EditText 所有属性