Android_App/Front-end

[Android] How to draw Icons? (Iconify)

brightlightkim 2022. 4. 12. 08:52

Drawing Icons


Android Iconify is a library that makes it easy to create and draw dynamically-customizable
icons in an Android application.


● Male and female gender icons
● Event icon
● Search and Settings
● Other icons you wish to incorporate in your UI



To use Android Iconify, you should include a dependency similar to the following in the
build.gradle file in your project’s app folder:

dependencies {
…
implementation ("com.joanzapata.iconify:android-iconify:2.2.2") {
exclude group: "com.android.support"
}
implementation ("com.joanzapata.iconify:android-iconify-fontawesome:2.2.2") {
exclude group: "com.android.support"
}
…
}
In your MainActivity’s onCreate method, initialize the Iconify library as follows:


In your MainActivity’s onCreate method, initialize the Iconify library as follows:

 

import com.joanzapata.iconify.Iconify;
import com.joanzapata.iconify.fonts.FontAwesomeModule;
onCreate() {
…
Iconify.with(new FontAwesomeModule());
…
}

 

For Drawing Icon
import com.joanzapata.iconify.IconDrawable;
import com.joanzapata.iconify.fonts.FontAwesomeIcons;
…
Drawable genderIcon = new IconDrawable(getActivity(), FontAwesomeIcons.fa_male).colorRes(R.color.male_icon).sizeDp(40);
genderImageView.setImageDrawable(genderIcon);
The constant values for the necessary icons are:
● fa_male (male icon)
● fa_female (female icon)
● fa_map_marker (event icon)
● fa_search (search icon)
fa_gear (settings icon)

 

https://github.com/JoanZapata/android-iconify

 

GitHub - JoanZapata/android-iconify: Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,...

Android integration of multiple icon providers such as FontAwesome, Entypo, Typicons,... - GitHub - JoanZapata/android-iconify: Android integration of multiple icon providers such as FontAwesome, E...

github.com

 

'Android_App > Front-end' 카테고리의 다른 글

Learning RxJava  (0) 2022.11.05