How to use a custom typeface in a widget?

What is needed is to render the font onto a canvas, and then pass it on to a bitmap and assign that to an ImageView. Like so: public Bitmap buildUpdate(String time) { Bitmap myBitmap = Bitmap.createBitmap(160, 84, Bitmap.Config.ARGB_4444); Canvas myCanvas = new Canvas(myBitmap); Paint paint = new Paint(); Typeface clock = Typeface.createFromAsset(this.getAssets(),”Clockopia.ttf”); paint.setAntiAlias(true); paint.setSubpixelText(true); paint.setTypeface(clock); … Read more

Android : Typeface is changed when i apply password Type on EditText

The following might solve it for you. pass.setTypeface(user.getTypeface()); Essentially it just passes the Typeface of your username field and passes it as the Typeface for your password field. I found an explanation of this in the Dialogs API Guide. Tip: By default, when you set an EditText element to use the “textPassword” input type, the … Read more

Set font for all textViews in activity?

Solution1:: Just call these method by passing parent view as argument. private void overrideFonts(final Context context, final View v) { try { if (v instanceof ViewGroup) { ViewGroup vg = (ViewGroup) v; for (int i = 0; i < vg.getChildCount(); i++) { View child = vg.getChildAt(i); overrideFonts(context, child); } } else if (v instanceof TextView … Read more

Android – How to change bottom navigation bar text’s font family

add the font file in the res/font/ folder to bundle fonts as resources then You can change it using style resources. In your styles.xml: <style name=”Widget.BottomNavigationView” parent=”Widget.Design.BottomNavigationView”> <item name=”fontFamily”>@font/your_font</item> </style> Then apply it as a theme in your view: <android.support.design.widget.BottomNavigationView … android:theme=”@style/Widget.BottomNavigationView” /> Just checked on my app, it works fine. reference: https://developer.android.com/guide/topics/ui/look-and-feel/fonts-in-xml.html#fonts-in-code

iPhone system font

To the delight of font purists everywhere, the iPhone system interface uses Helvetica or a variant thereof. The original iPhone, iPhone 3G and iPhone 3GS system interface uses Helvetica. As first noted by the always excellent DaringFireball, the iPhone 4 uses a subtly revised font called “Helvetica Neue.” DaringFireball also notes that this change is … Read more