droidicon - Over 1600 icons for Android

    Rating: ★★★★☆
    View: 240
    Download: 105
    Từ khóa:

    NEW - 750+ Google Material Design Icons

    Icons From...

    - Google Material Design

    - FontAwesome

    - Iconic

    - Entypo

    - Meteocons

    droidicon provides over 1600 customizable icons, 25 ready-made social badges and more! droidicon makes it super easy to add icons and badges to your app. All of the social badges are already styled. Just add them to your app! Or you can customize the icons however you want. 

    Based on IconicDroid

    - 1600+ icons

    - use icons from FontAwesome, Iconic, Entypo, and Meteocons

    - 25 ready-made social badges using brand colors

    - add strokes, transparency, and color filters to icons

    - create badges and icons of any size or color, totally customizable

    Icon Examples

    Add strokes, transparency, and color filters to your icons

    How to Use

    1. Add library project

    Android Studio

    Add this to your build.gradle file:

    dependencies {
        compile 'com.github.theDazzler:droidicon:x.y.z@aar'
    }
    replace 'x.y.z' with version number you wish to use
    
    repositories {
            mavenCentral()
        }

    2. Setup

    Add this xmlns:droidicon="http://schemas.android.com/apk/res-auto" to the top of your xml layout file. Here is an example:

    That's it!

    3. Usage

    Ready-made Badges

    Ready-made badges can be added to your layout like this:

    
    
    
    
    

    That will add a Facebook, Vimeo, and Spotify badge to your layout. Click here for a list of all ready-made badges.

    Custom Badges

    Custom Badges can be added to your app in xml. To add a badge, do this:

    That will add a badge with a blue background color and white icon. The icon will be the FontAwesome icon "fa-user".

    You can add a stroke to the icon by doing this:

    This will add a 5 pixel orange stroke to the "fa-user" icon.

    change size

    droidicon:db_size="40dp"

    creates a badge that fits inside a 40dp x 40dp square

    add transparency

    droidicon:db_alpha="125"

    The alpha value can range from 0-255. 0 means the icon will be invisible, and 255 means it will be full color.

    change padding to create more or less space between icon and badge circle

    droidicon:db_icon_padding="20dp"

    The list of all custom attributes for DroidiconBadge is here

    Custom Icons

    Icon names are like this:

    - Google Material Design icons: use prefix "gmd". i.e "gmd-phone-bluetooth-speaker"

    - FontAwesome icons: use prefix "fa". i.e "fa-user"

    - Entypo icons: use prefix "entypo". i.e "entypo-phone"

    - Entypo social icons: uses prefix "esocial". i.e "esocial-c-tumblr"

    - Iconic icons: use prefix "iconic". i.e "iconic-download"

    The easiest way to add icons without the background is to do it programmatically.

    iconView = findViewById(R.id.test_icon);
    
    IconicFontDrawable iconicFontDrawable = new IconicFontDrawable(this.getApplicationContext());
    iconicFontDrawable.setIcon("fa-thumbs-up");
    iconicFontDrawable.setIconColor(getResources().getColor(R.color.light_blue));
    
    iconView.setBackground(iconicFontDrawable);

    This will create a light blue thumbs-up icon without the circular background.

    add a stroke

    iconView = findViewById(R.id.test_icon);
    
    IconicFontDrawable iconicFontDrawable = new IconicFontDrawable(this.getApplicationContext());
    iconicFontDrawable.setIcon("fa-thumbs-up");
    iconicFontDrawable.setIconColor(getResources().getColor(R.color.light_blue));
    iconicFontDrawable.setContourColor(getResources().getColor(R.color.dark_blue));
    iconicFontDrawable.setContourWidth(5);
    iconicFontDrawable.drawContour(true);
    
    iconView.setBackground(iconicFontDrawable);

    add a ColorFilter

    iconicFontDrawable.setColorFilter(Color.CYAN, PorterDuff.Mode.MULTIPLY);

     

    loading Đang tải...

    template được ưa chuộng