【发布时间】:2012-08-14 22:18:04
【问题描述】:
我已经知道使用按钮和 edittext 拨打电话号码的代码,但我不知道如何继续。
public void onClick(View arg0) {
EditText num=(EditText)findViewById(R.id.editText1);
String number = "tel:" +num.getText().toString().trim();
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(number));
startActivity(callIntent);
}
我需要允许标记为 Button1 的按钮解析此 Intent 的代码。
【问题讨论】:
-
学习你的安卓基础知识将帮助你解决这个问题。