Is it possible to set a customised font for an entire android application in one shot. I mean I do not want to use setTypeFace for every textview in every activity. And not only textviews but every possible text.
Just make your own TextView:
public class CustomFontTextView extends TextView {
// make every constructor call init();
private void init() {
setTypeFace(...);
}
}
In xml:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.yourcompany.yourproject.views.CustomFontTextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Test"/>
</LinearLayout>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With