zoukankan      html  css  js  c++  java
  • 关于部分基本控件的使用

     android: id= ” @id/id值”                             //设置id值

           android: text=”**”                                       //定义显示文字

            android: layout_width="wrap_content"      //组件宽度为文字宽度

           android: layout_height="wrap_content"      //组件宽度为文字高度

    TextView(文本显示框)

           android: maxLength=”6”                              //允许最大字符数

           android: textColor=”#0FF00”                        //文字颜色

           android: textSize=”50px”                             //文字大小

           android: textStyle=”bold”                             //文字样式

           android: password=”true”                            //是否以密文方式显示

           android: layout_margin=”10px”                    //外边距

           android: backgroud=”@drawable/图片名称”     //背景

           getText().toString()                               //获得控件的文本内容

           setText()                                          //设置控件的文本内容

    Button (按钮)

    EditText(编辑框)

             android: password=””                  //是否以密文方式显示

           android: numeric=”integer”             //只能输入数字

           android: hint=”**”                         //水印

           android: enabled=”false”                //设置是否可用,false不能用

    RadioButton(单选按钮)

           嵌入到RadioGroup中实现单选效果

             android: checkedButton=”radio的id值 ”;

           int getCheckedRadioButtonId( );           //获得被选中的单选按钮的id

    CheckBox(复选框)

             android: checked=”true”;               //设置默认选中

             CheckBox(Context context)             //实例化CheckBox组件

           void setChecked(boolean checked)      //设置默认选中

    ImageView(图片)

           android: maxHeight=” ”;                //定义图片的最大高度

           android: maxWidth=” ”;                 //定义图片的最大宽度

           android: src=” ”;                           //定义显示图片的ID

    ImageButton(图片按钮)

  • 相关阅读:
    184. Department Highest Salary【leetcode】sql,join on
    181. Employees Earning More Than Their Managers【leetcode】,sql,inner join ,where
    178. Rank Scores【leetcode】,sql
    177. Nth Highest Salary【leetcode】,第n高数值,sql,limit,offset
    176. Second Highest Salary【取表中第二高的值】,sql,limit,offset
    118. Pascal's Triangle【LeetCode】,java,算法,杨辉三角
    204. Count Primes【leetcode】java,算法,质数
    202. Happy Number【leetcode】java,hashSet,算法
    41. First Missing Positive【leetcode】寻找第一个丢失的整数,java,算法
    删除
  • 原文地址:https://www.cnblogs.com/linjiaxiaomeiainia/p/6869883.html
Copyright © 2011-2022 走看看