Let third-party launcher always get themed icon in MIUI (Maybe also works for other Android based OS).

Related tags

App AlwaysThemedIcon
Overview

English

简体中文

Download

Introduction

This module can let third party launcher always use icons with MIUI/Flyme Themes. It may also work with other custom Android based OS, if they have the same logic of the theme and icon stuff. (As I tested it also works with Flyme)

The left one is Apex Launcher without this module, the right one is with this module enabled.

How does it works

This module only do one thing: Hook "android.content.pm.LauncherActivityInfo.getIcon" method, set the argument(int denisty, aka DPI) to 0. So the method will load icon with MIUI theme.

I think this is a feature instead of a bug of MIUI, since the icons in these Themes are fixed DPI, so if you request a specific DPI the system will try to get the most similar DPI icon from the "Resources" of the app package, because App developer usually put icons with different DPI in the Resouces.

How to apply this module

Install it, enable it in Xposed (I only tested with LSPosed). and make sure your launcher is enabled in the scope of this module in LSPosed. Then reboot.

Another important thing is, most launchers have icon cache, so even you have this module enabled, it still shows the original icon. You have to try to refresh the icon cache of your launch. The most common way is install a icon pack that supported by your launcher, switch to it and then switch back to "None" or "System Icon" or something. Or try to modify some settings, E.g. icon size, icon shape or soemthing. Also can try the Android's "Clean Cache" feature.

But as I test with Apex Launcher, these methods doesn't take effort. Seems with Apex Launcher the only way is do a backup and restore...Or just clean data, but your desktop layout and settings will be lost...

简体中文 (Simplified Chinese)

介绍

这个模块是让第三方Launcher的图标也能使用MIUI/Flyme的主题图标。也许在其它第三方Android OS上也起作用,如果他们也用同样的方法来处理主题和图标的话。(据测试,在Flyme上也起作用)

以下左图是Apex Launcher,没安装模块只能显示App原始图标,右图为安装了该模块,可以显示MIUI的主题图标

工作原理

这个模块只干一件事情:Hook "android.content.pm.LauncherActivityInfo.getIcon" 方法,把第一个参数(这个参数是int denisty, 意为图标DPI)设为0。然后这个方法就会加载带主题的图标。

这应该是一个feature,不是bug,因为MIUI主题里的图标DPI都是固定的,所以如果想通过这个API请求一个指定DPI的图标,那么系统就会尝试直接从App的Resources里读取最相近的图标,因为开发者一般会放入不同DPI的图标。

如何使用

安装该模块,在Xposed中启用(我只在LSPosed上测试了),并且在作用域中勾上你的Launcher,然后重启

还有一个重要的事情是,大部分Launcher都有图标缓存,所以即使你启用了这个模块,但Launcher没有刷新图标缓存,所以还是显示原来的图标。你得想办法去刷新图标缓存,一种最简单的可以尝试的方法是装一个与你的Launcher兼容的第三方图标包,然后切换到这个图标包,再切回“无”或者“系统图标”之类的,让它刷新图标缓存。也可以尝试一些设置比如改变图标大小,图标形状之类的,也可以尝试Android的“清除缓存”功能。

但我在Apex Launcher上试了,上述方法都不管用。。。看起来在Apex上只能用备份还原功能来刷新缓存,或者直接清除应用数据,但这样你的桌面布局和设置就没了。。。如果用上面的方法无法刷新缓存,又不想清数据,只能自己想想办法了。

You might also like...
Let Me Downgrade - Add support for downgrading apps on Android 12 and 13.
Let Me Downgrade - Add support for downgrading apps on Android 12 and 13.

Let Me Downgrade Android's app installation system does not allow users to downgrade to an older version of an app when they already have a newer vers

This is an open source launcher project for Android devices that has been built completely from scratch
This is an open source launcher project for Android devices that has been built completely from scratch

Description This is an open source launcher project for Android devices that has been built completely from scratch. The main goal of this launcher is

Minimal Android Launcher built with Kotlin.

Minimal Android Launcher A minimal launcher displaying only core apps you really need, with a note widget to quickly add reminders on your home screen

Pixel Launcher for everyone!
Pixel Launcher for everyone!

Flick Launcher Flick Launcher is a project started by Michele Lacorte. I want to create a launcher for google pixels style stock, with a few tweaks. O

Launchy - A custom launcher for our server that installs recommended mods

Launchy Our custom launcher which makes it easier to set up optional mods and in

Free and Open Source Launcher.
Free and Open Source Launcher.

Omega Launcher Free and Open Source Launcher Installation & Download Our builds are available on: Github: Releases or Actions (usually). F-Droid: Eith

IMCL is a Minecraft launcher which supports Mod managment, game customizing and so on.

IDEA Minecraft Launcher A simple Minecraft launcher 简体中文 日本語 Esperanto Introduction IMCL is a Minecraft launcher which supports Mod managment, game cu

Optimize notification icons for ColorOS and adapt to native notification icon specifications
Optimize notification icons for ColorOS and adapt to native notification icon specifications

Optimize notification icons for ColorOS and adapt to native notification icon specifications

RoboDemo is a ShowCase library for Android to demonstrate to users how a given Activity works.
RoboDemo is a ShowCase library for Android to demonstrate to users how a given Activity works.

RoboDemo RoboDemo is a ShowCase library for Android to demonstrate to users how a given Activity works. A sample is available in the download area of

Owner
Strawing
Strawing
A third party app for android to manage your kindle.

Kindot - A third party app for android to manage your kindle.

null 5 Nov 23, 2021
The third-party Telegram android app.

The third-party Telegram android app.

NekoX Dev 3.5k Jan 8, 2023
Third-party native Jellyfin Android app

Findroid Findroid is third-party Android application for Jellyfin that provides a native user interface to browse and play movies and series. I am dev

Jarne Demeulemeester 513 Jan 1, 2023
Pixel Launcher Mods a root app for Android 12+ that enables you to add a number of features to the stock Pixel Launcher

A root app that enables you to add a number of features to the stock Pixel Launcher, without needing Xposed

Kieron Quinn 430 Jan 2, 2023
Library to change Android launcher App Icon and App Name programmatically !

AppIconNameChanger Change Android App launcher Icon and App Name programmatically ! Download Demo APK from HERE Kindly use the following links to use

Prabhakar Thota 587 Dec 29, 2022
Clippy - Android app that adds a "Copy to clipboard" share target to android share sheet (Especially for MIUI)

Clippy Android app that adds a "Copy to clipboard" share target to android share sheet MIUI 11 and 12 lack a "Copy to clipboard" option in the system

kriticalflare 2 Jan 3, 2022
A monotone line-based icon pack for android

Arcticons (Arctic icons) is a line-based icon pack forked from Frost but rebuild with consistent sizing and adjustments specifically for lines in mind

Donno 413 Jan 2, 2023
A simple party manager app

Party App ?? Android native app using Kotlin to manage parties ?? Status: Under development ?? How to use The backend of this project can be founded h

Ítalo Sérvio 1 Dec 2, 2021
Share your minecraft-adventure with your friends in nation-party.

Nation Party Make your adventure as shared with your friends and family in Nation Party. Features * Create your own party with your own name; * Invite

Luiz Otávio 1 Jan 9, 2022
An easy to use android library to let devs know how much internet-data their app is consuming

EasyAnalytics! an easy to use android library to let developers know how much internet-data their app is consuming. We can identify this as we want ba

Sachin Rajput 13 Feb 21, 2022