av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

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撥號器
標(biāo)題URL:http://uogjgqi.cn/article/djodjhh.html
掃二維碼與項(xiàng)目經(jīng)理溝通

我們在微信上24小時(shí)期待你的聲音

解答本文疑問/技術(shù)咨詢/運(yùn)營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流