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

转载于:https://www.cnblogs.com/wangchuanqi/p/5401515.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值