Set an image as drawableLeft on Button with using Icon Font (Iconics)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Demo
images
DESCRIPTION.md
LICENSE.txt
README.md

README.md

Set an image as drawableLeft on Button with using Icon Font (Iconics)

Platform Language License

Overview

Icon Font allows you to display icon images in text with ease. However, it is difficult to use different sizes for text and icon. By using the drawableLeft and drawableRight attributes on Android buttons, we can set an icon in button. So I will explain how to display icon on drawableLeft using icon font.

In the sample, Iconics is adopted as a library for using Icon Font.

How to use?

In the sample, drawable_icon_font_left attribute is set as shown below, and an image is generated from the icon font and displayed.

<Button
    android:text="{faw-android} android"
    />
<Button
    android:text="android"
    app:drawable_icon_font_left="@{`faw_android`}"
    />

animation

Author

R. Ayakix