How to change the startup activity in android?

前端 未结 4 494
情歌与酒
情歌与酒 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 05:50

    remove the intent-filter code from calendar Activity tag in manifest and add it to the Activity you wanna load first

     
           
    
           
                    
    

    I mean paste it in the activity you like to run as default.

     
                
                    
    
                    
                
            
    

    Where as

    From the docs

    category -- Gives additional information about the action to execute. For example, 
    
    CATEGORY_LAUNCHER means it should appear in the Launcher as a top-level application, while 
    
    CATEGORY_ALTERNATIVE means it should be included in a list of alternative actions the user can 
    
    perform on a piece of data.
    

    MAIN means that this activity is the entry point of the application, i.e. when you launch the application, this activity is created.

提交回复
热议问题