Android: Start Activity from preferences.xml

后端 未结 12 2008
轮回少年
轮回少年 2020-12-04 13:16

I would like to start an Activity from a default preferences.xml, with < intent > tag. The Activities are well tested, the problem is not with that. (I\'m extending Prefe

12条回答
  •  难免孤独
    2020-12-04 13:35

    I was able to fix this by changing the category in the intent filter from

    android.intent.category.DEFAULT

    to

    android.intent.category.PREFERENCE

    http://developer.android.com/reference/android/content/Intent.html#CATEGORY_PREFERENCE

    
        
            
            
        
    
    

    I guess if you want your action to be even more specific just remove the whole category node

    
        
            
        
    
    

提交回复
热议问题