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(图片按钮)

  • 相关阅读:
    struts1.X的jar包
    struts2.1.6所需jar包详解
    hibernate的运行原理
    hibernate的save()方法详解
    flash的动态加载技术
    havok之内存管理
    worker中加载本地文件报错的解决方案
    行为树之我见
    havok之thread和memory system
    havok之collision detection
  • 原文地址:https://www.cnblogs.com/linjiaxiaomeiainia/p/6869883.html
Copyright © 2011-2022 走看看