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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:55:23+00:00 2026-06-05T21:55:23+00:00

Why is it that both outs are printing 84? The first one should read

  • 0

Why is it that both outs are printing 84? The first one should read 84, the second should read 220. If I click a second time, both outs read 220.

public void btnClick(View v) {
    System.out.println(textView1.getWidth());
    textView1.setTextSize(TypedValue.COMPLEX_UNIT_PX, 55);
    System.out.println(textView1.getWidth());
}
  • 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-05T21:55:24+00:00Added an answer on June 5, 2026 at 9:55 pm

    Changing text size will not change the size of the view if it has already been measured. SetTextSize() will trigger an invalidate(), but that only triggers an onDraw() in the future. The view will not be measured again, and its width and height will remain the same. You can call requestLayout() on the view to get the width and height recalculated.

    If you just want to see the size of the text after changing the size (in terms of its dimensions) you can try http://developer.android.com/reference/android/graphics/Paint.html#getTextBounds(char%5B%5D, int, int, android.graphics.Rect)

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

Sidebar

Related Questions

My understanding is that both of these create a NSMutableString, only the first one
I read that both multiple returns and multiple goto statements are bad programming practice.
Suppose I have two classes that both contain a static variable, XmlTag. The second
It appears that both of these give me access to the first FORM element
I have two Activities that both list items in a table. For the time
I realize that both will work, but is one more correct than the other?
I have two apps that both access the same database. The first has clients
it took me some time to find out that both Eclipse and Aptana get
Suppose that both FirstModule and SecondModule handle the Application_BeginRequest event. Will it execute in
I feel that both are the same thing, but I am not sure.

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.