How to change the startup activity in android?

前端 未结 4 492
情歌与酒
情歌与酒 2021-02-01 05:45

I have two activities namely login and calendar in my Application. Currently my startup activity is \"calendar\". I want to r

4条回答
  •  深忆病人
    2021-02-01 06:09

    The startup activity [Launcher Activity] is declared in the projects' AndroidManifest.xml file

    Look for that activity tag in the manifest which looks like this

    
        
            
            
        
    
    

    Look at the attribute android:name. Main is the class which is launched when the app starts. Currently your calendar activity name should be there. Change that to the .classpath of your activity that you want to launch.

    That should do it. You may also want to do the hello world application in the tutorials and go through the docs a little to see how Android Applications work.

提交回复
热议问题