zoukankan      html  css  js  c++  java
  • android第二章控件2

    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

                android: adjustViewBounds=” ”;         //设置为true,则maxHeight和maxWidth

    ImageButton(图片按钮)

    TimePicker(时间选择器)

    方法

    描述

    Integer getCurrentHour ()

    返回当前设置的小时

    Integer getCurrentMinute()

    返回当前设置的分钟

    boolean is24HourView()

    判断是否是24小时制

    void setCurrentHour(Integer currentHour)

    设置当前的小时数

    void setCurrentMinute(Integer currentMinute)

    设置当前的分钟

    void setEnabled(boolean enabled)

    设置是否可用

    void set24HourView(Boolean id24HourView)

    设置时间为24小时制

    DatePicker(日期选择器)

    方法

    描述

    Int   getYear ()

    取得设置的年

    Int   getMonth()

    取得设置的月

    int   getDayOfMonth()

    取得设置的日

    void   setEnabled(boolean enabled)

    设置是否可用

  • 相关阅读:
    面向对象、构造函数的区别
    写一个function,清除字符串前后的空格。(兼容所有浏览器)
    两个DIV高度自适应方法(左右两个DIV高度一样)
    js数组去重
    input框处理删除小图标的功能
    查找显示高亮
    JSON.parse()和JSON.stringify()
    jquery封装
    怎么理解HTML语义化
    html5语义化标签
  • 原文地址:https://www.cnblogs.com/tz4630/p/6889916.html
Copyright © 2011-2022 走看看