0

I know slightly strange, but when we put wrap_content as a value for our layouts, what are the default values? Such as, I create a button with W and H both set to wrap_content. I'm aware it will change accordingly to the text inside, but when it's just a plain old button, what are the sizes? Are there ways to find out?

Just curious :)

1 Answers1

0

but when we put wrap_content as a value for our layouts, what are the default values?

There are no default values.

when it's just a plain old button, what are the sizes?

That will be determined by the button's background, which by default is determined by the style (if you applied one) or theme.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Is there an easy was to open the style? –  Jan 13 '18 at 21:37
  • You can drill into the theme that is applied on the button / app by clicking the theme value. The default attributes are part of the SDK. Someone might be able to tell you precisely where they are located. – dazza5000 Jan 13 '18 at 22:00
  • @user8494778: The definition of the theme technically varies by OS version, unless you are doing something that replaces the button background yourself. The definitions of the themes are in your Android SDK directory (`platforms/.../data/res/values/themes*.xml`, where `...` will be a directory based on the API level). – CommonsWare Jan 13 '18 at 22:02