亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Android 中啟動(dòng)自己另一個(gè)程序的activity如何實(shí)現(xiàn)

 更新時(shí)間:2017年04月23日 14:22:45   投稿:lqh  
這篇文章主要介紹了Android 中啟動(dòng)自己另一個(gè)程序的activity如何實(shí)現(xiàn)的相關(guān)資料,需要的朋友可以參考下

Android 中啟動(dòng)自己另一個(gè)程序的activity如何實(shí)現(xiàn)

可以使用action,舉例: 

1. 比如建立activity4,我們對(duì)它的AndroidManifest.xml修改一下 

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:<a  rel="external nofollow" class='replace_word' title="Android知識(shí)庫" target='_blank' style='color:#df3434; font-weight:bold;'>Android</a>="http://schemas.android.com/apk/res/android" 
   package="net.devdiv.activity4" 
   android:versionCode="1" 
   android:versionName="1.0"> 
  <application android:icon="@drawable/icon" android:label="@string/app_name"> 
    <activity android:name=".activity4" 
         android:label="@string/app_name"> 
      <intent-filter> 
        <action android:name="android.intent.action.MAIN" /> 
        <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
      <intent-filter> 
        <action android:name="devdiv.intent.action.activity4" /> 
        <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
    </activity> 
  </application> 
  <uses-sdk android:minSdkVersion="7" /> 
</manifest>  

2. 新建一個(gè)新工程activity5 

啟動(dòng)activity4的方法為       

    Intent intent = new Intent("devdiv.intent.action.activity4"); 
      startActivity(intent); 

感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論