Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9027371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:43:56+00:00 2026-06-16T06:43:56+00:00

I have an Android app that needs some adjustment if the user sets their

  • 0

I have an Android app that needs some adjustment if the user sets their font size to extra large (via Settings -> Display -> Font size in 4.0 and higher).

Is there a simple way for me to tell what the user’s font size preference is

Updated:
in my layout.xml I have lines similar to to setup a button

android:textAppearance="?android:attr/textAppearanceMedium"
android:textStyle="bold"
android:typeface="sans"

Notice that I’m not setting the font size directly. This layout works and looks good in all cases, except for the Extra Large setting. In that case, due to space limitations, it causes the button’s text to wrap to 2 lines.

My goal is to make a slight wording change in the case of Extra Large so that it doesn’t wrap

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:43:57+00:00Added an answer on June 16, 2026 at 6:43 am

    There’s a FONT_SCALE parameter you should be able to query the system for. I haven’t used it myself, but I imagine retrieving its value would look somewhat like this:

    float fontScale = Settings.System.getFloat(context.getContentResolver(), Settings.System.FONT_SCALE)
    

    However, I’d also like to point out that usually you shouldn’t be dealing with this value directly. In stead, use sp units for textual content so that you don’t have to worry about adjusting to user-preferred font sizes yourself, but rather let the system handle that.

    Also refer to: Why should we use sp for font sizes in Android?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Android app, I have some data that needs to be synced daily
I have a dialog in an Android app that I don't want the user
Lets say you have a web app related Android app that requires the user
I'm developing an Android app that needs to do some updating in the background
Suppose that, I have an android app that launches browser with some url supplied
I have an app that needs to display some PDF files. The files are
My android app needs to fetch some info from a php server that hosts
I have an android app that needs to connect frequently to the server to
i have an android app that needs to listen for incoming sms messages. i
I have an app that needs to encode some data using AES/CBC/no padding. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.