首页 > 编程知识 正文

美化UI界面,ui表格美化

时间:2023-05-05 01:42:30 阅读:56330 作者:4898

本篇先介绍基本的用户界面美化知识,下一篇介绍上一个实例; XML版本=' 1.0 '编码=' utf-8 '?

shape xmlns 3360 Android=' http://schemas.Android.com/apk/RES/Android ' Android 3360 shape=[ ' rectangle '|' oval ]矩形android:radius='integer' --常用半径时,以下属性会覆盖: 默认值为1dp。 安卓: topleft radius=' integer ' Android : topright radius=' integer ' Android 3360 bottom left radius=' integer ' Android ius '/gradient--渐变Android : angle=' integer '-- angle表示方向角度。 如果angle=0,则渐变从左向右。 然后逆时针旋转,angle=90时, 自下而上Android : center x=' integer ' Android 3360 centery=' integer ' Android 3360 center color=' integer ' Android 360 center cor te ger ' Android 3360开始颜色=' color ' Android 3360 type=[ ' linear '|' radial '|' sweep ' ] 安卓填充- -内边距安卓: left=' integer '安卓: top=' integer '安卓3360 right=' integer '安卓3360 :height='integer'/solid--大小适合填充颜色,但为十六进制颜色。 (例如,如果要设置半透明效果,请保持十六进制OK ) Android : color=' color '/stroke--指定边框。 border dashWidth和dashGap之一是0dp,Android : width=' integer ' Android 3360 color=' color ' Android 3360 dash width=' integer ' 填充含义android:color指定填充颜色的梯度:渐变android:startColor和android:endColor分别是开始和结束颜色,Ndroid33660和, 渐变的默认模式为android:type='linear ',即线性渐变,可以将渐变指定为径向渐变。 必须指定android:type='radial ',径向渐变必须指定半径Android :渐变radius=' 50 ' stroke:Android 3360 width=' 2dp '线也可以将线做成虚线的形状。 设置方法为: android:dashWidth=' 5dp ' Android 3360 dash gap=' 3dp ',Android : dash width表示水平线宽度,如'-'。 Android为corners :圆角android:radius为角弧,值越大越圆。 注: corners 1、android:radius和半径由以下单角度半径属性复盖: 默认值为1dp。 2、使用时,分别设置4个角度,如果大小不一致,eclipse的graphics preview会报告错误。 但是,直接用实机运转就可以了。 (例如,实线上边直角、下边弯曲角的效果)二state是否按Android : drawable :放置drawable资源android:state_pressed ),例如按钮按下android:state_focused :是否获得焦点,例如用户选择了文本框。 android:state_hovered :光标是否悬停。 android:state_selected :是一项与focused state相同的4.0新功能,与focus state完全不同,不像列表例如,RadioButton被选中。 Android : state _ checked :已选中。 例如,一个RadioButton现在可以检查。 android:state_enabled :可接受或单击触摸的事件android:state_activated已启动Android : state _ window _ focussion

注意:如果:有多个item,则程序将自动自上而下匹配,并应用第一个匹配项。 (不是最佳匹配)如果一个item没有任何状态说明,它就可以匹配任何状态。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。