android利用隱式intent跳轉界面



AndroidManifest.xml文件中,下面紅色部分的內容不可少
<activity android:name=".LoginActivity">
    <intent-filter>
        <action android:name="com.vrphogame.thyroidapp0716.ACTION_START" />
        <category android:name="com.vrphogame.thyroidapp0716.LOGIN_ACTIVITY" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>
java代碼:
Intent intent = new Intent("com.vrphogame.thyroidapp0716.ACTION_START");
intent.addCategory("com.vrphogame.thyroidapp0716.LOGIN_ACTIVITY");
startActivity(intent);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章