We have an icon pack (color) in our main app, and per additional icon pack (color) we want to add we have to create an additional icon pack (color) app. These apps only contain the icons and have no interface, they only show a dialog with a button that points back to the main app.
Every launcher points to an app and uses those drawables to apply the icon pack.
In our main app we can choose which icon pack we want to apply and send it to the launcher.
All app icons will be shown in the main app and we can apply single icons through the launcher, open the app and choose an icon.
We can add multiple colors or variations per icon pack. For example we have an icon pack called "Candybar" and have 3 different colors: blue, red, green.
-
Open dashboard_configurations.xml
-
Set enable_icon_packs to true
<bool name="enable_icon_packs">true</bool>
-
Choose a name for your default icon pack which will be included in our main app.
!!! Do not use dashes and double spaces here. If icon pack name exists of multiple words, use spaces.
<string name="icon_pack">candybar</string>
-
Choose a name for your default icon pack, or give it a different name of your choosing
!!! Do not use dashes and double spaces here. If color exists of multiple words, use spaces.
<string name="icon_pack_color">light blue</string>
- Replace
ic_icon_pack.png
in the drawable-nodpi-v5 folder with your own icon.This icon represents the icon pack image shown in the "Icon Packs" list in the app.
- Replace
ic_icon_pack_color.png
in the drawable-nodpi-v5 folder with your own icon.This icon represents the icon pack color image shown in the "Icon Packs" dialog in the app.
-
Copy the folder
Candybar_Icon_Pack
and paste it wherever you want, rename the folder to your name of choice -
Open
configuration.xml
which is in the values folder.-
Change the string value with name
app_name
to the name of your choice.<string name="app_name">New Icon Pack Name</string>
-
Change the string value with name
icon_pack
to the name of your choice.If you want to add a different color to an already existing icon pack, make sure this name is the same as the others. In this example we used candybar in our main app already, so this will become a different color for the same icon pack.
!!! Do not use caps here. If icon pack name exists of multiple words, use spaces.
<string name="icon_pack">candybar</string>
-
Change the string value with the name
icon_pack_color
to the name of your choice.!!! Do not use caps here. If color exists of multiple words, use space.
<string name="icon_pack_color">navy blue</string>
-
-
Open the folder in Android Studio, click on
Edit
at the top navigation, then go toFind
and click onReplace in Files
.-
In the first text box type in
com.candybar.dev.candybar_new_color
, in the second text box type in the following structure:main_app_identifier + . + icon_pack + _color
. Then click onReplace All
. It is very important to follow this structure or it will not work.Example:
- Main app package identifier:
com.candybar.dev
- Icon Pack Name:
candybar
*This needs to match what's inside:
<string name="icon_pack">candybar</string>
- Color:
navy blue
*This needs to match what's inside:
<string name="icon_pack_color">navy blue</string>
Convert your spaces into underscores
- Output example:
com.candybar.dev.candybar_navy_blue
- In the first text box type in
com.candybar.dev
, in the second text box type in your main app's package identifier. Then click onReplace All
. - Change the name of the folders to your chosen identifier:
- Find package directory
com.candybar
, right click on the directory,Refractor > Rename
and click onAll Directories
, fill in your identifier which comes after thecom.
and clickRefractor
.This will only change
candybar
. If you want to change thecom
you'll have to do it manually outside Android Studio. Make sure you do this for all 3 folders you find underjava
in Android studio. To find where these folders are, just right click them in android studio and clickOpen In > Explorer
. - Find package directory
dev
right under the one we just changed. Right click on the directory,Refractor > Rename
and click onAll Directories
, fill in your identifier which comes after thecom.candybar.
(this is the name you have chosen of your main app identifier sub domain) and clickRefractor
.
- Find package directory
-
-
Replace
ic_icon_pack.png
in the drawable folder with your own icon.This icon represents the icon pack image shown in the "Icon Packs" list in the app.
Note: The
ic_icon_pack.png
from the main app will be used over the one from the side app. -
Replace
ic_icon_pack_color.png
in the drawable folder with your own icon.This icon represents the icon pack color image shown in the "Icon Packs" dialog in the app.
-
Replace the
ic_launcher.png
in the following folders to change your app icon.- res/mipmap-mdpi/ic_launcher.png
- res/mipmap-hdpi/ic_launcher.png
- res/mipmap-xhdpi/ic_launcher.png
- res/mipmap-xxhdpi/ic_launcher.png
- res/mipmap-xxxhdpi/ic_launcher.png
This follows the same structure as the main app.
- Put your icons in the
res/drawable
folder. - Update your
drawable.xml
file in theres/xml
folder. - Update your
appfilter.xml
file in theres/xml
folder.
When you are done, click on Sync Project with Gradle Files
before running or exporting the app.