Android Application Name Appears as Activity Name

前端 未结 6 2034
长发绾君心
长发绾君心 2020-12-15 17:27

I have reviewed the manifest for application, and under apps launcher it displays as Activity Name rather than its app name? Why is this. I have another application where w

6条回答
  •  情书的邮戳
    2020-12-15 18:07

    For the first issue, you should be aware that in absence of a label on the launching Activity the name comes from the default label set in the android:label attribute on the application tag:

    
    

    If the Activity has a label, that label will be used instead.

    For the second issue, in the manifest, it is likely that all your activities specify an intent filter with an action of android.intent.category.LAUNCHER. For example:

    
         
             
             
             
         
    
    

    If you have such intent-filter tags on all activities, you should take out the intent filter tags on all but the Activity that you want to launch at startup. If this Activity has a label, it is the label that will be shown along with the launcher icon.

    As of 2019/01/03 on API 27+, it appears that the first activity with the LAUNCHER category will be launched and its label will be associated with the app icon, so it may not be strictly necessary to remove all the redundant intent filters, but I'd do it anyway because it can lead to confusion.

提交回复
热议问题