• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to manage multi activity?

Hi all,

I'm new android developer.
My program has 3 Activities: Activity_A, Activity_B and Activity_C
each Activity I overide onCreate() method.
I want when the program is started, Activity_C will display first.
How to do it?
And how to know which Activity will be display first?
Sometime I get a runtimeException from this program?
Please explain to me,
Many thanks !

Content of my mainfest.xml file:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="i3.customview"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="8" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
    
           <activity android:name=".Activity_A"
                  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=".Activity_B"
                  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=".Activity_C"
                  android:label="@string/app_name">
                 <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        
    </application>
     <uses-permission android:name="android.permission.INTERNET" />
</manifest>
 
"<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
"
I think this means the activity is the main activity and it has an icon in the launcher. So you need to keep this only on Activity_C and remove it from the other activities.
 
Back
Top Bottom