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部分

  • 相关阅读:
    HDU 5640 King's Cake
    HDU 5615 Jam's math problem
    HDU 5610 Baby Ming and Weight lifting
    WHU1604 Play Apple 简单博弈
    HDU 1551 Cable master 二分
    CodeForces659C Tanya and Toys map
    Codeforces 960E 树dp
    gym 101485E 二分匹配
    Codeforces 961E 树状数组,思维
    Codeforces Round #473 (Div. 2) D 数学,贪心 F 线性基,模板
  • 原文地址:https://www.cnblogs.com/wangchuanqi/p/5401515.html
Copyright © 2011-2022 走看看