android studio常用控件

来源:互联网 发布:在淘宝当主播怎么赚钱 编辑:程序博客网 时间:2024/06/18 13:02

       android studio这个软件越用越顺手,里面也有很多的功能。现在我给大家分享一下里面的几个控件及一些运用

 1.  TextView  文本框:

             autoLink="all"     自动超链接

              lines                    默认占几行

              textStyle             字体加粗或变斜

             elliPsize             里面有一个marquee值可以做走马灯

              (以下三个配合elliPsize使用)

             focusable="true"    

            focusableInTouchMode="true"

           clickable="true"      

           drawablexx           图标     xx是上下左右英文     



     2.EditText        输入框

            hint            提示

            inoutType     只能输入(数字,字母.....)


     3.shape           外形

        shape="rectangle"             矩形

       stroke                                   设置边框粗细

       padding                              内间距

       corners                              设置四角弧度

      solid                                   单颜色填充

       gradient                           渐变色但最多只能设置三种颜色


    4.  _____selector         选择器    下划线自己定义

      item    例如         

<item android:drawable="@drawable/et_shape" android:state_focused="false"></item><item android:drawable="@drawable/et_shape1" android:state_focused="true"></item>




原创粉丝点击