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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -