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 8426929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:39:45+00:00 2026-06-10T04:39:45+00:00

Possible Duplicate: Difference of px, dp, dip and sp in Android? So I know

  • 0

Possible Duplicate:
Difference of px, dp, dip and sp in Android?

So I know I should use sp only for text font sizes. Now, what I don’t understand is what they do exactly. Let’s say I have the following attribute for a TextView in a layout for a normal screen size:

android:textSize="17dp"

If I replace it with this:

android:textSize="17sp"

What happens? In the visual editor, it doesn’t look any different?

I am guessing that if I have, say a 3.2″ screen which qualifies for the normal size layout, and a 4.0″ screen which also qualifies for my normal size layout, then if I use sp, the text’s size will be slightly scaled up? Is that right?

  • 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-10T04:39:47+00:00Added an answer on June 10, 2026 at 4:39 am

    text rendered with sp is more compatible with accessibility options, for example if the users enables a high contrast mode or universally increases the size of text. Since sp is also density independent, that is the only difference between sp and dp.

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

Sidebar

Related Questions

Possible Duplicate: Difference of px, dp, dip and sp in android I am new
Possible Duplicate: Difference between e.target and e.currentTarget I don't really understand the difference between
Possible Duplicate: Difference of px, dp, dip and sp in android I've found several
Possible Duplicate: Difference between (function(){})(); and function(){}(); I am trying to understand a few
Possible Duplicate: Difference between pointer variable and reference variable in C++ When should I
Possible Duplicate: Difference between OnClick() event and OnClickListener? I'm semi-new to Android development and
Possible Duplicate: Difference between “var” and “object” in C# I would like to know
Possible Duplicate: Difference between Activity Context and Application Context I want to know the
Possible Duplicate: Difference between -%> and %> in rails I need to know what
Possible Duplicate: Difference between Covariance & Contra-variance I'm trying to understand what covariance and

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.