2013-03-13 38 views

回答

0

你可以把你的喜好的意圖,將打開你的活動:

from the official docs

例如,這裏是你如何使用偏好項來打開一個網頁:

<Preference android:title="@string/prefs_web_page" > 
    <intent android:action="android.intent.action.VIEW" 
      android:data="http://www.example.com" /> 

您可以使用以下屬性創建隱式和顯式意圖:

android:action 

根據setAction()方法分配的操作。

android:data 

按照setData()方法分配的數據。

android:mimeType 

按照setType()方法分配的MIME類型。

android:targetClass 

按照setComponent()方法,組件名稱的類部分。 android:targetPackage 按照setComponent()方法,組件名稱的包部分。

你會把你的類名到

android:targetClass 

和你的包名稱爲:

android:targetPackage 

請嘗試,讓我知道如何去

+0

我不知道該怎麼做你意思是 ? – 2013-03-13 16:56:43