zoukankan      html  css  js  c++  java
  • Android发送短信界面

    package com.example.wang.application1;
    
    import android.os.Bundle;
    import android.support.v7.app.AppCompatActivity;
    
    public class MainActivity extends AppCompatActivity {
    
        //回调方法,以on开头的方法
        //在创建时自动调用
        @Override
        protected void onCreate(Bundle savedInstanceState) {
    
            //调用父类的回调方法
            super.onCreate(savedInstanceState);
    
            //设置内容视图文件
            //建立Activity和layout文件之间的关联
            setContentView(R.layout.lianxi_linearlayout);
    
            //1.获得这个组件
            //Button bt2=(Button)findViewById(R.id.button2);
    
    
            //2.操作这个组件
            //bt2.setText("新按钮");
    
            //日志输出
    //        System.out.println("日志输出=应用开始运行");
    //        Log.v("example.wang", "verbose级别的日志信息");
    //        Log.d("example.wang", "Debug级别的日志信息");
    //        Log.i("example.wang", "Info级别的日志信息");
    //        Log.w("example.wang", "Waining级别的日志信息");
    //        Log.e("example.wang", "Error级别的日志信息");
    
        }
    }
    Java部分
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginLeft="0dp">
    
        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="To" />
        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Subject"
            />
        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Message"
            android:layout_weight="1"
            android:gravity="top" />
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
    
            >
            <Button
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="Reset"
                android:layout_weight="1"
                android:textAllCaps="false"/>
            <Button
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="@string/app_name1"
                android:layout_weight="1"
                android:textAllCaps="false"/>
        </LinearLayout>
    
    </LinearLayout>
    xml部分

  • 相关阅读:
    harbor install & docker-compose
    ngx安装 (转)
    docker对镜像自动重启的设置
    docker安装脚本
    sql中的递归拼接
    【HC89S003F4开发板】 4端口消抖
    【HC89S003F4开发板】 6crc校验
    【HC89S003F4开发板】 3串口调试
    【HC89S003F4开发板】 1环境搭建
    用mkdocs在gitee码云上建立一个简单的文档博客
  • 原文地址:https://www.cnblogs.com/wangchuanqi/p/5401515.html
Copyright © 2011-2022 走看看