If an app has multiple screens it means that it has multiple activities.
When a user launches the app, the first screen to appear is the Main Activity.
Does an app always start from the Main Activity?
Go to your manifest file in your android studio.
You will see something like this:
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The name of the activity that will show there is the first activity to launch, you can read more about it here
You can change this activity to another activity if you would like to, MainActivity
is a default when you create a new project.
For example:
replace <activity android:name=".MainActivity">
with
<activity android:name=".SecondActivity">
And now SecondActivity
will show first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With