zoukankan      html  css  js  c++  java
  • 安卓

    1.开发Activity步骤
        第一步:写一个类继承Activity
        第2步:重写oncreate方法
        第3步:在主配置文件中注册Activity
            <activity android:name=".类名"
                      android:label="@string/app_name">
                <intent-filter>
                    <!-- app的入口>
                    <action android:name="android.intent.action.MAIN" />
                    <!-- 桌面显示-->
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
    2.Activity常用方法
         View findViewById(int id)   //根据组件的ID取得组件对象
         setContentView(int layoutResID) //设置布局文件,设置显示组件
    3.TextVies
        android:maxLength = "6"            //允许最大字符数
        android:textColor = "#FF0000"       //文字颜色
        android:textSize = "50px"            //文字的大小
        android:textStyle = "bold"           //文字样式
        android:password = "true"                //是否以密文方式显示
        android:layout_margin = "100px"         //外边距  
        android:background = "@drawable/a"     //背景
        android:id = "@+id/id值"               //设置id的值


        getText().toString()    //获得控件的文本内容
        setText                 //设置控件的文本内容
     注意 :<!-- -->
     4.Button
     5.EditText
          android:enabled = "false"  //设置是否可用,false不能用

  • 相关阅读:
    Live2d网页看板娘
    阿里云服务器(云主机)搭建网站攻略 最新9.5一个月
    Cookie小案例
    Node搭建多人聊天室
    JS鼠标点击爱心,文字特效
    JQ根据鼠标上下移动设置导航浮窗
    JS背景网页樱花特效
    Node中怎么保持MySql一直连接不断开
    Navicat for MySQL破解版
    Windows Server 2008 R2 安装MySql,PHP
  • 原文地址:https://www.cnblogs.com/-chaoming/p/6860344.html
Copyright © 2011-2022 走看看