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)

    设置是否可用

  • 相关阅读:
    类和接口对比
    concurrenthasmap
    java中的三大注解
    基本数据类型,注意首字母
    常见ascii码记忆
    Java软件工程师面试题:Java运行时异常与一般异常有什么不一样?
    &和&&的共同点和区别、Java字符含义和Java创建对象的几种方式
    Java面试题中常考的容易混淆的知识点区别
    Java面试题整理:这些Java程序员面试中经常遇见的题目,必须掌握才能有好结果
    Spring Cloud 微服务架构的五脏六腑,统统晒一晒!
  • 原文地址:https://www.cnblogs.com/22joke/p/6866729.html
Copyright © 2011-2022 走看看