Android Question How to get border width

LBor

Member
Hi to all
I want to get border width and border color and corner radius or border , so if i know that i will know inner height and inner width of view (panel or edit text or etc ...)
i saw many post in here but all of them says about set border and not how to get it.
thank you
 

drgottjr

Well-Known Member
Licensed User
i could be wrong, but border color, border width, corner radius width and color are part of color drawable. you apply such a color to a view's background. since you apply the color drawable, you, by definition set the border width and color and radius width and color when you run colordrawable.initialize2(). in other words, you already have the information you're looking for.

you can query a color drawable's properties with a javaobject, but since you set these properties, what's the sense in asking for information you already have. what am i missing here?
 

drgottjr

Well-Known Member
Licensed User
in looking at some documentation, it does appear that you can back your way into determining a view's border and radius properties (assuming the view's background is a colordrawable). it's possibly doable from b4a (in the right hands), but i see it more as a snippet of inline java run from b4a (which is how i would do it if i had to do it). anyway, i just wanted to mention it to you as a possibility before saying that i still don't follow exactly what you're after.
 

LBor

Member
Hi Dear , at first, thanks for replay, let me be clear. How can you access details such as the thickness of the border or the color or ... you have done in the design section in the coding section?
 
Top