简体   繁体   English

如何在Android 2016中以编程方式更改应用程序图标

[英]How to change an application icon programmatically in Android, 2016

I, as so many Android programmers before me, would like to change the Icon of my App from the inside. 我和之前的许多Android程序员一样,我想从内部更改App图标。 My App would be a simple WiFi Switch App, with an Icon that displays the state. 我的应用程序将是一个简单的WiFi Switch应用程序,带有一个显示状态的图标。 Yes, WiFi is in the Notification Bar. 是的,WiFi位于通知栏中。 Byte me, I am lazy. 拜托我,我很懒。 Anyway, there is not a simple system in place to do so, so it seems. 无论如何,似乎没有一个简单的系统可以这样做。

I have searched, low and shallow (not longer then an hour). 我已经搜索过,低而浅(不超过一个小时)。 And this is what I came up with: 这就是我想出的:

Question: is there a better / easier way to do so than here in the links? 问题:是否有比链接中更好/更轻松的方法? It has been 7 years already! 已经七年了!

The answer from 2013 explains it as it is today. 2013年的答案就可以解释目前的情况。 There is still no way to change the launcher icon of an app without using third-party software. 如果不使用第三方软件,仍然无法更改应用程序的启动器图标。 I doubt Android will add support for this in the near future, as you can use widgets for this sort of thing already. 我怀疑Android是否会在不久的将来增加对此的支持,因为您已经可以将小部件用于此类操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM