How to get android studio Component(Button, text,etc...) size (Width, height or default size) -


i developing android studio plugin using intellij , want component size(button or textview's width,height ) in intellij plugin.

enter image description here

in picture, wrote code height="wrap_content" , width "wrap_content".

i want know button size( dp or px number).

also when textview or component defined wrap_content, don't know width , height.

i think, android studio components has default width , height. don't know defined!

thank you!

the default size android:minheight attribute set 48dip default.

and take look: http://developer.android.com/reference/android/view/viewgroup.layoutparams.html

wrap_content, means view wants big enough enclose content (plus padding)

and of course: https://stackoverflow.com/a/23984754/4409113


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -