When we study, we feel that it takes time and memory to build a new project, so we often create multiple activities under one project to test
But how do we set the default first-started avtivity to verify that our new experiment is successful?
There's a androidmanifest.xml under App.src.main that records what activity you have on your project, and of course it's the default startup item.
<?xml version= "1.0" encoding= "Utf-8"? ><manifest xmlns:android= "http://schemas.android.com/apk/res/ Android "package=" Com.example.pro.first "> <application android:allowbackup=" true "android:icon=" @mipmap/ic_launcher "android:label=" @string/app_name "android:supportsrtl=" true "Android:theme=" @styl E/apptheme "> <activity android:name=". Mainactivity "> </activity> <!--attention:this is auto-generated to add Google Play services T O your project for App indexing. See Https://g.co/AppIndexing/AndroidStudio for more information. --<meta-data android:name= "com.google.android.gms.version" android:value= "@integer/go Ogle_play_services_version "/> <activity android:name=". Main2activity "> <intent-filter> <action android:name=" Android.intent.action.MAIN " /> <category android:name= "andRoid.intent.category.LAUNCHER "/> </intent-filter> </activity> </application>& Lt;/manifest>
Let's just put this code in the middle of the activity you want to start by default, just like the code above starts by default, main2activity
<intent-filter> <action android:name= "Android.intent.action.MAIN"/> <category android: Name= "Android.intent.category.LAUNCHER"/> </intent-filter>
Android settings default start activity first