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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:44:20+00:00 2026-05-28T04:44:20+00:00

If you have ever had to make you own custom buttons for Android then

  • 0

If you have ever had to make you own custom buttons for Android then you will have used a StateList Drawable; or you should have. Now if you look at the Android documentation for StatList Drawables then you will see that there is an option called “android:constantSize” that is said to behave like this:

Boolean. “true” if the drawable’s reported internal size remains constant as the state changes (the size is the maximum of all of the states); “false” if the size varies based on the current state. Default is false.

Now that is all well and good. I think it is telling me that if the size of the image does not change in any of the states then you should set this to true. My question would be: what benefit does setting this value to true have? Does it speed up rendering times? Is it more efficient in the background?

Essentially, what benefit will setting this attribute to true give me?

  • 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-05-28T04:44:21+00:00Added an answer on May 28, 2026 at 4:44 am

    When the flag is set, the drawable computes a constant size once and uses that for all queries about its size. When the flag is not set, it queries the current drawable each time for its intrinsic width.

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

Sidebar

Related Questions

Have you ever had alternating background colors in a Jasper report and then exported
Have you ever had to justify the choice over using .NET instead of Java
Ever since deleting the original settings.settings file I have had endless problems getting the
For those of you who have ever used Microsoft Excel in a manner that
Have you ever used lazy C++? I am trying to create .CPP files out
Oh, the frustration! I have literally had the most frustrating morning ever. I've spent
Setup Have you ever had the experience of going into a piece of code
Have you ever obfuscated your code before? Are there ever legitimate reasons to do
Have you ever created or encountered a self modifying code in Java? If yes,
Have you ever tried learning a language while on a project? I have, 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.