新浪微博 登陆  注册   设为首页 加入收藏

学PHP >> Android教程 >> [android]控件Button常用属性

[android]控件Button常用属性

查看次数8183 发表时间2012-09-04 15:08:26

代码中常用属性:

Button bt=new Buttion(Context context);

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


xml中常用属性:

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

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

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

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

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


(转发请注明转自:学PHP)    


  相关推荐



1楼 Donyell说: 2016-12-22 10:43:45
Usually I do not read post on blogs, but I wish to say that this wri-etup very forced me to try and do so! Your writing style has been amazed me. Thanks, very nice post.
2楼 Donyell说: 2016-12-22 10:44:07
Usually I do not read post on blogs, but I wish to say that this wri-etup very forced me to try and do so! Your writing style has been amazed me. Thanks, very nice post.

  发表评论
昵称:
(不超过20个字符或10个汉字)
内容: