Wednesday, February 19, 2014

[android-developers] Re: How does Manifest recognize the particular activity as a main or first activity in android?

Have you tried to run a project with this manifest? Which activity shows first?

El miércoles, 19 de febrero de 2014 02:26:26 UTC-3, Meena Rengarajan escribió:
Hi all, I am having muliple activities named as first, second, third and fourth activity. I have to launch third activity (ie Instruction activity) than first activity (ie. Login activity). Here, how does manifest recognize the activity as a main activity and all the multiple activities may have launcher and specifies the action item as .MAIN.

For an example,

<application
   android:icon="@drawable/ic_launcher"
   android:label="@string/app_name"
   android:theme="@style/AppTheme" >
   <activity
       android:name=".MainActivity"
       android:label="@string/app_title" >
       <intent-filter>
           <action android:name="android.intent.action.MAIN" />
           <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
   </activity>
   <activity
       android:name=".OtherActivity"
       android:label="@string/other_title"
       android:icon="@drawable/ic_other_launcher" >
       <intent-filter>
           <action android:name="android.intent.action.MAIN" />
           <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
   </activity>
</application>
here how does the manifest recognize the activity as a first or main activity and launch it as a first activity among multiple activities?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment