以编程方式更改图标启动器和应用名称 [英] Change icon launcher and app name programmatically

查看:91
本文介绍了以编程方式更改图标启动器和应用名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到了很多这样的帖子安装后如何更改应用程序的图标和标签?,但是其中任何一篇文章都可以为我提供确切答案,以解决我的问题。

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.

预先感谢:)

推荐答案

查看此答案:https://stackoverflow.com/a/15249542/2337837
主要思想是修改活动部分在 AndroidManifest.xml 中,然后为每个图标创建< activity-alias> ,然后为通过编程适当的活动别名

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

这篇关于以编程方式更改图标启动器和应用名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆