0

有活动顺序自动更改的应用程序

日志

申请开始

01-07 17:30:55.178: E/ASE(11253): RouteListActivity.onCreate

01-07 17:30:55.208: E/ASE(11253): RouteListActivity.onResume

开始第二次活动

Intent intent = new Intent(getBaseContext(), PointListActivity.class);
startActivity(intent);

01-07 17:30:57.948: E/ASE(11253): RouteListActivity.onPause

01-07 17:30:57.948: E/ASE(11253): PointListActivity.onCreate

01-07 17:30:57.958: E/ASE(11253): PointListActivity.onResume

开始第三个活动

Intent intent = new Intent(getBaseContext(), PointActivity.class);
startActivity(intent);

01-07 17:30:59.258: E/ASE(11253): PointListActivity.onPause

01-07 17:30:59.268: E/ASE(11253): PointActivity.onCreate

01-07 17:30:59.278: E/ASE(11253): PointActivity.onResume

按回

01-07 17:31:00.858: E/ASE(11253): PointActivity.onPause

如果以前是 PointListActivity 为什么要恢复 RouteListActivity

01-07 17:31:00.868: E/ASE(11253): RouteListActivity.onResume

按回

01-07 17:35:42.858: E/ASE(11253): RouteListActivity.onPause

为什么现在 PointListActivity 恢复

01-07 17:35:42.858: E/ASE(11253): PointListActivity.onResume

显现

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="xxx"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_LOGS" />
    <uses-permission android:name="android.permission.CAMERA" />

    <application
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme"
        >        

        <activity
            android:name="xxx.AuthActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name="xxx.Preferences"
            android:label="@string/title_activity_preferences" >
        </activity>

        <service android:name="xxx.MyService" >
        </service>

        <activity
            android:name="xxx.PointListActivity"
            android:label="@string/title_activity_point_list" 
            android:launchMode="singleInstance" >
        </activity>

        <activity
            android:name="xxx.PointActivity"
            android:label="@string/title_activity_point" >
        </activity>

        <activity
            android:name="xxx.RouteListActivity"
            android:label="@string/title_activity_route_list" >
        </activity>

    </application>

</manifest>
4

0 回答 0