• 关于部分基本控件的使用


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

  • 相关阅读:
    ByteArrayInputStream&ByteArrayOutputStream源码分析
    常用FastJSON的SerializerFeature特性及日期转换格式
    SpringAware
    Zuul(SpringCloud学习笔记一)
    RabbitMQ和SpringBoot的简单整合列子
    Cngigure和BUS实现远端配置
    vagrant安装homestead环境使用总结
    sublime安装插件
    vagrant配置(假设已经安装好了vagrant并且下载好了box)
    linux php安装配置oci8模块
  • 原文地址:https://www.cnblogs.com/linjiaxiaomeiainia/p/6869883.html
Copyright © 2020-2023  润新知