How do I get multiple icons to launch different activities in one application?

前端 未结 2 589
青春惊慌失措
青春惊慌失措 2020-11-27 03:09

I have an application with two activities and I\'d like to be able to have two icons appear in the launcher, each launching the respective activity within the app.

2条回答
  •  有刺的猬
    2020-11-27 03:40

    You're definitely going in the right direction. This is what I have (truncated, because I have all of my activities in the list while I'm devving for fast access):

    
        
            
            
        
    
    
        
            
            
        
    
    

    I think what may be happening is interference from your action elements which specify the name of your class. I'm pretty sure that actions and categories need to refer to constants. I don't know how that would result in what you're seeing, but you could try removing them. Other than that, you pretty much have what I have.

提交回复
热议问题