When I use sp as my font size unit in the XML file, I go to spare parts and change font size, my app's font size is not changing. Does anyone know a way to resolve that?
The font size feature in Spare Parts is a holdover that doesn't have any effect on anything else.
Related
We can make positioning of widgets 'responsive' by using bias/weight etc, but how do we make the font sizes responsive? By 'responsive' I mean the font size that changes according to size of device - i.e for large device the font size will be large, and for small device the font size will be small.
I tried using the library for ssp/sdp, but that didn't solve the issue.
Another suggested way is to create different font sizes in dimens.xml for different device size, and use them, but that would require calculating the different font sizes for the fonts used in the entire app.
Is there any other way?
you can use this library for font size :
implementation 'com.intuit.ssp:ssp-android:1.0.6'
I'm developing and Android application that will support changes in the size of its text when the user changes it on settings.
For this reason I want to know if there's a way for me to separate my application resources according to the font size changes. For example, can I create an resource folder named like "drawable-huge" (the font size). If so do you know the suffixes I can use it on the folders? If that isn't possible, do you know any other thing I can do to prevent UI problems when the font sizes are bigger or smaller?
Thank you.
You can use something like this
textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 65);
which 65 is the font size in sp
for more information vist http://developer.android.com/reference/android/widget/TextView.html#setTextSize%28int,%20float%29
Problem: When implementing a custom font I notice quite a big change in the font size. (Without any altering to the font size in the XML file)
This is causing a significant variation between the Actual font size in comparison to the size shown in the Graphical layout in ADT. (Visually about 20sp smaller)
I am building a timer application and want to use a Digital Looking font.
Question: Can a .ttf file affect the font size relative to a constant 'sp' ?
To answer my own question.
YES. a .ttf file does have a 'base font size' and this may vary from one .ttf to another.
As stated in my comment above:
I figured out how to change the base size of a .ttf using FontForge (fontforge.org) There is a great tutorial on how to do this here: forum.xda-developers.com/showthread.php?t=990853 I did have to play around with more options then noted in the tutorial to get my font just right but it works perfect!
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.
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.