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)

    设置是否可用

  • 相关阅读:
    【设计模式:单例模式】使用单例模式载入properties文件
    Java 强引用,软引用,弱引用
    sharepreference实现记住password功能
    WWDC2015
    activity之栈管理
    LeetCode:Palindrome Number
    ZOJ 3822 Domination(概率dp)
    WCF报 当前已禁用此服务的元数据发布的错误
    HTML常见标签总结
    xml基础总结
  • 原文地址:https://www.cnblogs.com/22joke/p/6866729.html
Copyright © 2011-2022 走看看