首先在布局文件中添加打电话所需要的必要的控件,
以最简单的为例
<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"
tools:context=".MainActivity" >
<Button
android:id="@+id/bt"
android:layout_width="wrap_content"
and