Andriod Studio实现拨打电话和发送短信功能
在 Android Studio中创建项目,然后在该项目中创建一个Module名称为“IntentDial”。在该 Module中实现本实例,具体步骤如下:
(1)在新建 Module的res\layout目录下下添加布局
文件shouji.xml,将添加的布局管理器设置为相对布局管理器,然后在布局管理器中添加4个用于显示公司信息的文本框,再添加两个 ImageButton 组件,分别为拨打电话按钮和发送短信按钮。代码如下:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent">
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="技术支持:吉林省明日科技有限公司"
android:layout_marginTop="20dp"/>
<TextView
android:id="@+id/text2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="网址:http://www.mingrisoft.com"
android:layout_marginTop="10dp"
android:layout_below="@+id/text1"/>
<TextView
android:id="@+id/text3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="企业邮箱:mingrisoft@mingrisoft.com"
android:layout_marginTop="10dp"
android:layout_below="@+id/text2"/>
<TextView
android:id="@+id/text4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="技术服务热线:0431-84978981"
android:layout_marginTop="10dp"
android:layout_below="@+id/text3"/>
<ImageButton
android:id="@+id/imageButton_phone"


1728

被折叠的 条评论
为什么被折叠?



