[Xiaomi Mi Mix 2 Themes, Apps, and Mods] Huexxx:
Hi all.

After a lot of research and try/error, I've figured out how to set a custom icon grid for Stock MIUI Launcher and a custom number of columns on Toggles Pannel.

After using EPIC Rom, I've jumped to new Oreo Global Beta 8.1.18, and I wanted the same aspect on launcher and notification toggles.

In my case, I like a 5x7 Icon Grid on the launcher... and a 5/5 columns (portrait/landscape) Toggles Pannel.

In order to set this mod you must be rooted.

There are two ways to apply the mod: manually putting the files on the proper folder, or flashing a .zip on TWRP.

The attached .zip Grid&Toggles_v2.zip contains two files: com.miui.home and framework-miui-res

You must put them with your "root explorer" (I use MiXplorer, and it directly puts the files with needed permissions and ownership) into /system/media/theme/default/ folder with:

- 0644 permissions (rw-r--r--)

- owner root 0

- group root 0

Then you only have to reboot in order to apply changes.

If you prefer to flash it, just flash CustomGrid&Toggles_v2.zip from TWRP.

Custom: If you prefer another numbers, you can modify the files (com.miui.home and framework-miui-res) by yourself:

- Each file is a .zip file with the extension removed.

- Add .zip suffix to the files

- Inside each file there is a file named theme_values.xml that contain the overlays to apply to your framework/launcher.

- To change

Launcher Icon Grid

, on com.miui.home case, you must change the following values:

<integer name="config_cell_count_x">5</integer>
<integer name="config_cell_count_y">7</integer>

- First value is the number of columns, and second value is the number of rows.

- Once modified and saved, it must be packed again in .zip format and rename the file to com.miui.home without extension.

- To change

Notifications Toggles Pannel

, on framework-miui-res case, you must change the following values:

<integer name="edit_fixed_position">14</integer>
<integer name="expanded_status_bar_toggles_column">5</integer>
<integer name="expanded_status_bar_toggles_land_column">5</integer>
<integer name="expanded_status_bar_toggles_single_page_column">5</integer>
<integer name="expanded_status_bar_toggles_single_page_land_column">5</integer>

- First value is number of showed toggles (apart from "Sort" toggle).

- Second and fourth values are the columns number on portrait mode.

- Third and fifth values are for landscape mode.

- In portrait mode, it originally has 4 columns with 3 rows -> 12 toggles including "Sort".

- In landscape mode, it originally has 6 columns with 2 rows -> 12 toggles including "Sort".

- According to this, "edit_fixed_position" is originally set to 11, and the value is consistent with both modes.

- Take into account this: If you want 5 columns in portrait mode, you must set "edit_fixed_position" to 5x3-1= 14... 5 columns by 3 rows (fixed right now) minus the "Sort" toggle. If you want 6 columns, you must set "edit_fixed_position" to 6x3-1= 17.

- If "edit_fixed_position" value is larger than expected, it should create additional rows with toggles. Let configure it with 5/6 columns (5 columns in portrait, 6 columns in landscape)... it should have only two rows on landscape (fixed setting), 6x2=12 toggles... but "edit_fixed_position" is larger than this value (14) so it needs a third row to place three additional toggles.

- Once modified and saved, it must be packed again in .zip format and rename the file to framework-miui-res without extension.

If you want to flash this custom files from TWRP, you must put them inside the flashable zip and replace existing.

The aim of the mod is to use it on original MIUI ROMs (because EPIC, xiaomi.eu, etc have their own methods to customize this things). I'm using it over Global Beta 8.1.26, but it should work over every ROM, Global or Chinesse, Stable or Beta, MIUI9 or MIUI8.

Remember always to make a nandroid backup to avoid problems. Just in case, if your phone doesn't boot up after adding the files, it's very easy to repair it.

- Reboot on TWRP.

- Flash CustomG&TRemover.zip

Credits:

https://xdaforums.com/redmi-note-2/development/theme-overlay-mods-t3533425

https://xdaforums.com/showthread.php?t=1633333

Changelog:

v0: Initial release

v2: Icon title text ajusted to avoid overlapping, flashable .zip files to install/remove.

Best regards!