android实现打电话功能

上传者: public_calss | 上传时间: 2021-09-02 16:37:13 | 文件大小: 21KB | 文件类型: RAR
解压就可运行。public class PhoneActicity extends Activity { private EditText mobileText; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mobileText = (EditText)this.findViewById(R.id.mobile); Button button = (Button)this.findViewById(R.id.button); button.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { String mobile = mobileText.getText().toString(); //拔打电话号码 //"android.intent.action.CALL" Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"+ mobile)); startActivity(intent);//内部会添加android.intent.category.DEFAULT

文件下载

资源详情

[{"title":"( 20 个子文件 21KB ) android实现打电话功能","children":[{"title":"phone","children":[{"title":"AndroidManifest.xml <span style='color:#111;'> 752B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"layout","children":[{"title":"main.xml <span style='color:#111;'> 685B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-ldpi","children":[{"title":"icon.png <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"icon.png <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-hdpi","children":[{"title":"congsmall.png <span style='color:#111;'> 4.33KB </span>","children":null,"spread":false},{"title":"icon.png <span style='color:#111;'> 4.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 179B </span>","children":null,"spread":false},{"title":"itcast.xml <span style='color:#111;'> 159B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"cn","children":[{"title":"itcast","children":[{"title":"phone","children":[{"title":"PhoneActicity.java <span style='color:#111;'> 1005B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"cn","children":[{"title":"itcast","children":[{"title":"phone","children":[{"title":"PhoneActicity.class <span style='color:#111;'> 2.98KB </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false},{"title":"R$layout.class <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'> 280B </span>","children":null,"spread":false},{"title":"assets","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 360B </span>","children":null,"spread":false},{"title":".project <span style='color:#111;'> 841B </span>","children":null,"spread":false},{"title":"gen","children":[{"title":"cn","children":[{"title":"itcast","children":[{"title":"phone","children":[{"title":"R.java <span style='color:#111;'> 948B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • pig8484 :
    刚开始搞这个东西。先收藏下来。
    2014-10-10
  • a877423999 :
    还没看 不过应该能成的吧!!11
    2013-01-02

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明