zoukankan      html  css  js  c++  java
  • Android

    1.TextView(标签控件) 

    1.1常用:      

        android:text          //显示文本内容      

       android:textColor    //文字颜色      

       android:textSize    //字体的大小      

       android:textStyle  //字体样式:bold,italic     

       android: maxLength //允许的最大字符数   

       android:password //是否用密文显示:true,false  

     1.2方法:   

          setText(String);//设置文本内容

          getText().toString();//返回文本内容  

    1.3补充属性      

    android:layout_width:   组件宽度      

    android:layout_height:  组件高度      

    android:id+"@+id/id值"   设置控件是我唯一标识      

    android:background       设置背景   

    注意:        

    fill_parent:组件的宽度/高度充满整个屏幕       

     wrap_content:组件的宽度/高度为内容的实际宽度/高度

    2.Button(按钮)

    3.EditTest(输入框)  

    3.1属性:   

         android:enabled                   //文本值无法改变:true不可编辑,false可编辑(默认false)

         android:selectAllOnFocus     //在获得焦点时,会全选文本内容:true,false    

        android:focusable              //true获得焦点,false不获得焦点(默认获得焦点)

    4.RadioButton(单选按钮)   

         RadioGroup(单选按钮组)

              android:orientation="horizontal"       //设置布局方式       

              android:checkedButton="@+id/rb2"      //设置默认选中的单选按钮     

    注意:单选按钮RadioButton,一般需要嵌套在RadioGroup中达到单选的目的

    方法:    getCheckedRadioButtonId();//获得选中的按钮的id

  • 相关阅读:
    复制、删除、移动文件、获取文件的版本信息、更改文件属性,删除只读文件
    How to use the MQ?
    StreamReader、 StreamWriter
    我的第一个AJAX程序
    XML操作
    SQL 使用XML数据修改语言
    认识 ASP.NET 3.5 MVC 路由解析分析
    北京2008奥运会开幕式&闭幕式下载(NBCBT附字幕)
    认识 ASP.NET 3.5 MVC 路由 理解默认路由表
    每天都有新发现 2009年10月21日 Decimal 和存储过程OUTPUT
  • 原文地址:https://www.cnblogs.com/pohuaiwang/p/6840164.html
Copyright © 2011-2022 走看看