What is the font in Android's ActionBar? - android

What font is used by default, in the holo Android ActionBar?
I've only been able to find answers on how to change the font, but not what the default font is.
Thanks.

On API Level 14+, the default font face for everything is Roboto. On API Level 13 and below, the default font face for everything is Droid Sans.
Conceivably, that could be changed by device manufacturers, though.

If you don't set any font programmatically then it will consider your device's font settings and set that for your actionbar.

Related

Why textview font size is looking small on newer device like nexus P . How can i resolve this issue ?

As you can see the fontsize is smaller in right image than fontsize in left side image
Please look at the android official document for typography
https://material.io/guidelines/style/typography.html#typography-typeface
Best practice to use fonts size as given by android like Title, sub title etc., which make better view for all the device sizes.
This is just a setting on android.
sp and dp revolves around that, so it might be that your newer device has a lower default setting.
On your emulator do the following.
go to settings --> display --> font size or display size.
This is nice, because if you code using sp/dp in your app, it will be able to change after what the user has as default settings.
Nothing you can do to really "resolve" it, as it is a user setting, but you can design your app so that it works with smallest and largest settings.

Oriya font to be displayed in Android app (Lenovo K3)

I want to display certain text in Oriya font in my android app. There is no default support in android for Oriya language. I tried different ttf files for Oriya font but not able to display the content. Can anyone help me in this?
I have tried the following code keeping the oriya.ttf file in my assets folder.
Typeface typeFace=Typeface.createFromAsset(getActivity().getApplicationContext().getAssets(),"fonts/oriya.ttf");
tvSoft.setTypeface(typeFace);
If you want change font in android this is the best solution:
https://github.com/chrisjenx/Calligraphy

Roboto font for Android 4+?

Do I need to use Roboto font and put it to asset folder if my app will support only Android 4+ devices?
I would greatly appreciate for your help. Alex. P.S. Sorry for my English:)
You can use Roboto natively from Android 4.1+ like this:
android:fontFamily="sans-serif" // roboto regular
android:fontFamily="sans-serif-light" // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed
For any version below that, you have to load the font yourself. Look at this answer I gave a while back for more information.
Answer
Ok. I think, I got it.
Samsung phones are by far the most popular Android phones. Whilst it's
true that all Samsung phones from 4.1 and up have Roboto, they also
have something called Samsung Sans, and if your user has set it as
their default font then the android:font-family (as #Ahmad says)
requests all return Samsung Sans, not Roboto. If you have fixed tight
layouts with no wriggle-room that can't stretch, Samsung Sans will
break them. There's no easy way round this. If you absolutely have to
have Roboto, you must package it as an asset and set it as the
typeface explicitly.
Thx to #Ahmad as well as #Kenton Price's comment here: https://stackoverflow.com/a/14633032/2553905
To add to Ahmad's excellent answer, you can swap out 'light' or 'condensed' to whichever style it is you want from the list in the Material Design guidelines here:
http://www.google.com/design/spec/style/typography.html#typography-roboto-noto
For example:
android:fontFamily="sans-serif-medium" // roboto medium
And so on.
This comment adds no more than Ahmad's, but just clears up that you are not limited to the 3 examples he gave, you can use any.
From documentation:
Ice Cream Sandwich introduced a new type family named Roboto, created
specifically for the requirements of UI and high-resolution screens.
Read more about Typography.

Android App: how to read Font Size under Settings?

I am developing an Android Application and I would like to read the Font Size under Settings->Display->Font Size.
So if a user has set his Font Size to Small/Big/Huge, I would like to apply this automaticly to all my text
I am using a Samsung Galaxy Nexus, Android 4.1.2
Thank you in advance for your help
Try reading FONT_SCALE from android.provider.Settings.System.
You can also define your text size using "sp" units which is the same like "dp" but scales according to the users system setting for text size. No need to read the font size from the system yourself.

To change Android Default Font Size

Can anyone please tell me where exactly the Default Text Font size is set in the android framework.When I change the font size using Spare Parts package and reboot my android device, the font size sets to Normal style by default.But I want it to be Extremely Large by default.
Thanks,
Riyaz
If you just want to set font size for the whole phone. Try going to
Settings (Phone) > Accessibility.
Choose Large Text there.
NOTE: I am assuming you just want the font for the phone and not via an app.
You can't change a default font size. You can define a theme, and define a font size in your theme. You can read about defining themes and styles in the android developer reference documentation.
You can change font size, style etc in your application, but not for whole device. To do that i guess you need to root your phone and provide custom fonts with specified font size in it.
For andriod 2.3.5 go to SMS click on Menu-> Settings scroll down until you see Font Setting and select Font Size Setting
According to http://recombu.com/mobile/article/changing-font-size_M18292.html there is no native option for that, up to Android 3.0.
You have to install some third party app. "Big Font" appears to be a popular one.

Categories

Resources