The easiest way to customize fonts. You can change fonts on direct xml. There are 16 fonts in it. You can directly add your own font to the "assets" folder.
Add the repository to your project build.gradle:
repositories {
maven {
url "https://jitpack.io"
}
}
And add the library to your module build.gradle:
dependencies {
compile 'com.github.10uroi:FontChange:2.0'
}
<com.onurciner.fontchange.FTextView
app:xfontFamily="Alien_Encounters"
android:text="Hello World! -> Alien Encounters"
android:id="@+id/view1"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp" />
<com.onurciner.fontchange.FTextView
app:xfont="fonts/myfont.ttf"
android:text="My Font"
android:id="@+id/view1" />
app:xfontFamily="Black_and_White"
app:xfont="fonts/myfont.ttf"
app:xfontStyle="bold"
<com.onurciner.fontchange.FButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/button_my"
android:text="My Button"
app:xfontFamily="Friday_13" />
<com.onurciner.fontchange.FEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/edittext_my"
app:xfontFamily="Prismfont" />