相信很多开发的同学们免不了遇到过这个问题,就是调用系统的发送短信界面,其实这个问题还是比较容易的,只需向系统发送一个Intent,并附带相关参数就可以了,下面以一个demo说明。
类似下图的界面
activity_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<Button
android:id="@+id/btn_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/padding_small"
android:gravity="center"
android:paddingLeft="@dimen/padding_smal