Android app icon name picked from activity label than from application label

前端 未结 5 2063
旧巷少年郎
旧巷少年郎 2021-02-19 05:56

Not sure if anyone else posted this question, didn\'t find any, though there are similar ones.

This is my manifest xml:



        
5条回答
  •  星月不相逢
    2021-02-19 06:11

    An alternative solution to the one proposed by Commonsware (which I've found to be hit and miss on some devices) is to set the label of the application in the manifest as you're doing, to not set the label of the launcher activity in the manifest and instead to set it programmatically in your activity's onCreate(Bundle) method as follows:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTitle(R.string.activity_startup_label);
        // do whatever else you need to
    }
    

提交回复
热议问题