java - android how to change the starting activity -
i have built application 1 activity android. want add login page should run first. how can change application run login first?
my first activity mainactivity.java. went application's properties -> run/debug settings -> edit conf. -> launch action. there mainactivity, cannot see login activity.
i using eclipse, way.
is there easy way fix this?
modify manifest:
<activity android:name=".your_login_activity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity>
and modify entry of mainactivity
<activity android:name=".mainactivity" android:label="@string/app_name" > </activity>
update
you should read declaring activity in manifest , use of intent filters more. [search 'using intent filters']
Comments
Post a Comment