Change icon launcher and app name programmatically

旧时模样 提交于 2019-12-12 11:19:34

问题


I saw many posts like this How to change the icon and label of an app once it is installed? but any of those posts could give me the exact answer so as to solve my problem.

I used this but it only changes the action bar icon :

 Button appicon1;   
 appicon1.setOnClickListener(new OnClickListener(){

            @Override
            public void onClick(View v) {
                getActionBar().setIcon(R.drawable.ic_launcher);
            }

        });

Giving any examples will be highly appreciated.

Thanks in advance :)


回答1:


See this answer : https://stackoverflow.com/a/15249542/2337837 : The main idea is to modify your Activity section in AndroidManifest.xml, then create <activity-alias> for each of your icons, then set enable attribute for the appropriate activity-alias programmatically



来源:https://stackoverflow.com/questions/22129724/change-icon-launcher-and-app-name-programmatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!