日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Android撥號器

1、界面效果圖

創(chuàng)新互聯(lián)公司主要從事成都網(wǎng)站設(shè)計(jì)、成都做網(wǎng)站、網(wǎng)頁設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)定結(jié),10余年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):13518219792

2、AndroidManifest.xml

 
 
 
 
  1.  
  2.    package="com.tjp" 
  3.    android:versionCode="1" 
  4.    android:versionName="1.0"> 
  5.  
  6.  
  7.    
  8.              android:label="@string/app_name"> 
  9.           
  10.            
  11.          
  12.           
  13.        
  14.        
  15.    
  16.  

注冊電話撥打服務(wù)

3、界面代碼

 
 
 
 
  1.  
  2.      android:orientation="vertical" 
  3.      android:layout_width="fill_parent" 
  4.      android:layout_height="fill_parent" 
  5.      android:layout_width="fill_parent" 
  6.      android:layout_height="wrap_content" 
  7.      android:text="@string/mobilelable" 
  8.  /> 
  9.      android:layout_width="fill_parent" 
  10.      android:layout_height="wrap_content" 
  11.      android:id="@+id/mobile"/>
  12.      android:layout_width="wrap_content" 
  13.      android:layout_height="wrap_content" 
  14.      android:text="@string/buttonlabl" 
  15.      android:id="@+id/btncall" 
  16. /> 
  17.  

4、界面值定義strings.xml

 
 
 
 
  1.  
  2.      
  3.     請輸入手機(jī)號碼     
  4.     電話撥號器      
  5.     撥打 
  6.  

5、activity

 
 
 
 
  1. package com.tjp;  
  2. import android.app.Activity;  
  3. import android.content.Intent;  
  4. import android.net.Uri;  
  5. import android.os.Bundle;  
  6. import android.view.View;  
  7. import android.widget.Button;  
  8. import android.widget.EditText;  
  9. public class PhoneActivity extends Activity {  
  10. private EditText mobile;  
  11. @Override  
  12. public void onCreate(Bundle savedInstanceState) {  
  13. super.onCreate(savedInstanceState);  
  14. setContentView(R.layout.main);  
  15. Button btncall=(Button)this.findViewById(R.id.btncall);  
  16. mobile=(EditText)this.findViewById(R.id.mobile);  
  17. btncall.setOnClickListener(new  View.OnClickListener(){  //匿名內(nèi)部類  
  18.   @Override  
  19.   public void onClick(View v) {   
  20.     String mobilemobileText=mobile.getText().toString();  
  21.     Intent intent=new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+mobileText));//撥打電話                 
  22.     startActivity(intent);  
  23.    }  
  24.   });  
  25.  }  

【編輯推薦】

Android智能手機(jī)操作系統(tǒng)

深入理解Android消息處理系統(tǒng)原理

在Android應(yīng)用程序中使用Internet數(shù)據(jù)


名稱欄目:Android撥號器
網(wǎng)站鏈接:http://www.dlmjj.cn/article/djodjhh.html