Skip to content

Adding icons and making them work

Sarsa Murmu edited this page Jul 1, 2024 · 2 revisions

Icons

  • The recommended icon size is 256×256 px
  • Supported formats are PNG WebP and XML (Vector)
  • place them in the app/src/main/res/drawable-nodpi folder

Code

  1. To make icons work in a launcher, you'll need to add some lines of code to the Appfilter: app/src/main/values/appfilter.xml & app/src/main/res/xml/appfilter.xml. You can gather the info with an app like Icon Request, it should look like this:
<appfilter>

	<!-- CandyBar Dev -->
	<item component="ComponentInfo{com.candybar.dev/com.candybar.dev.activities.MainActivity}" drawable="candybar_dev"/>

</appfilter>
  1. Paste all the info in both appfilter.xml files and check if the drawable name matches with your icon.
  2. To preview the icons in your own icon pack, you'll need to add the names to the drawable.xml files too: app/src/main/values/drawable.xml & app/src/main/res/xml/drawable.xml.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<version>1</version>    
	
	<item drawable="candybar_dev" />

</resources>
Clone this wiki locally