No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
app
gradle/wrapper
.gitignore
FontFamilyDataBinding.iml
LICENSE
README.md
build.gradle
device-2016-03-06-185823.png
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Set custom font in your xml with the help of DataBinding.

http://androidgig.com/setting-custom-font-through-xml-with-databinding/

You just need to write one line of code in your xml :

 app:font="@{`amatic`}"

Your binding method would be defined in custom class

@BindingAdapter({"bind:font"})
public static void setFont(TextView textView, String fontName) {
    textView.setTypeface(CustomFontFamily.getInstance().getFont(fontName));
}

find full article on http://androidgig.com/setting-custom-font-through-xml-with-databinding/