zoukankan      html  css  js  c++  java
  • Android UI组件学习

    android.view.View类是全部UI组件的父类。
    如果一些属性的内容本类找不到的时候一定要到父类之中进行查找。
    所谓的学习组件的过程就是一个文档的查找过程。
    ※    Android之中所有的组件都是View类的子类
    ※    所有的配置属性也可以使用组件类中提供的方法进行配置。 
    
    文本显示组件TextView的学习:
    TextView,主要是对静态文字的显示。
    所有的组件可以直接通过一个样式表文件进行属性的配置。
    
    ※    Button是TextView的子类,是一个特殊的文本。
    ※    文本显示组件(TextView)的功能只是显示一些基础的文字信息,而如果用户想要定义可输入的文本组件以达到很好的人机交互操作,则只能使用编辑框:EditText完成。
    ※    密码的实现依靠,“android:password=”true””
    文本编辑的其他属性:
    获得焦点是 android:selectAllOnFocus=”true”;
    只允许是数字:android:numeric=”integer”
    不允许编辑:this.edit.setEnabled(false);
    
    单选按钮:
    ※ RadioGroup类相当于定义了一个单选钮的容器;
    ※ RadioButton类用于定义单选钮的内容。
    <RadioGroup
        android:orientation=”horizatation”
        androd:checkedButton=”@+id/mail”>
            <RadioButton
                Android:id= “@+id/mail” 
                Android:text=”UTF-8”/>
    <RadioButton
                Android:id= “@+id/gbk” 
                Android:text=”GBK”/>
    
    </RadioGroup>


    FrameLayout : 层次堆叠
  • 相关阅读:
    sudo在shell脚本执行的问题
    mahout的数据文件格式
    mahout概述
    基于keepalived的redis系统master双机热备,读数据负载均衡设置方案
    输入挂(读数大致格式)
    POJ3762 The Bonus Salary! (费用流+离散化)
    codeforces round 321 div2 D Kefa and Dishes(状态压缩dp)
    HDU5492 Find a path (dp)
    大数模版
    RMQ模版
  • 原文地址:https://www.cnblogs.com/YangBinChina/p/3178302.html
Copyright © 2011-2022 走看看