Welcome to the Forkicons contributing guide! This file will tell you what you need to know to contribute to Forkicons.
Before you start, please fork the project and clone it to your machine.
Afterwards, you can either contribute icons or code.
To contribute icons, you only need an icon editor, a file explorer, a text editor, and a terminal window.
See the below image for a summary of the icon guidelines. If you don't follow them, a team member will likely request changing the icons.
The icon should be an identical but a monotone variant of the original icon.
Here's how to add an icon to Forkicons:
- Your icon in the SVG format, adhering to the above guidelines. The filename must use snake case (e.g.
files_by_google.svg
). - The package and activity name of the app.
Please check the icon tool guide for more information.
-
Add the ready SVG to the
svgs
directory. -
Add a new line to
app/assets/appfilter.xml
(in alphabetical order, by thename
attribute), and map the new icon to a package name and app's activity. For example:<item component="ComponentInfo{com.google.android.apps.nbu.files/com.google.android.apps.nbu.files.home.HomeActivity}" drawable="files_by_google" name="Files by Google"/>
A general template is as follows:
<item component="ComponentInfo{[PACKAGE_NAME]/[APP_ACIVITY_NAME]}" drawable="[DRAWABLE NAME]" name="[APP NAME]"/>
-
Done! You're ready to open a pull request. Please set
develop
as the base branch.
-
Connect your Android device or emulator to your laptop/desktop PC that has
adb
installed (see this tutorial for more information) and open the app whose details you want to inspect, e.g. Telegram. -
Open a new Command Prompt or Terminal window and input
adb devices
. -
Finally, type the below-given command to get the information about the currently open application.
For Mac or Linux:
adb shell dumpsys window | grep 'mCurrentFocus'
For Windows:
adb shell dumpsys window | find "mCurrentFocus"
The part before the /
character in the above image, i.e. org.telegram.messenger
, is the package name ([PACKAGE_NAME]
). The part after it, i.e. org.telegram.messenger.DefaultIcon
, is the activity name ([APP_ACIVITY_NAME]
).
- Download the IconRequest app.
- Launch the app and click one of the options:
- UPDATE EXISTING — to copy packages with activities.
- REQUEST NEW — to save icon images and packages with activities.
- Select the apps for which youʼd like to request or make icons.
- Copy, save or share.
- Download the Icon Pusher app.
- Launch the app.
- Select the icon(s) you want to upload or select all by pressing the square in the top right. Then press "Send".
- View the packages with the activities for each app on the Icon Pusher website. Please make sure the
drawable="[DRAWABLE NAME]"
matches the icon SVG file name.
While adding icons is the main focus for most contributors, code-related contributions are welcome.
To build Lawnicons, select the appDebug
build variant.
Here are a few contribution tips:
- The
app
module contains most of Forkicons' core code, while thesvg-processor
module contains the code that converts the SVGs inside thesvgs
folder into Android Drawables. Generally, theapp
module is where you should make most of your contributions. - You can use either Java or, preferably, Kotlin.
- Make sure your code is logical and well formatted. If using Kotlin, see "Coding conventions" in the Kotlin documentation.
- Set
develop
as the base branch for pull requests.