Hi guy,

I'm trying to make my custom view looks like a square...
I'm putting my view in a linear layout like this :

LinearLayout
- Header view
- square view (my custom view)
- footer view

With the screen orientation set to "Portrait" *I would like my square
view to have height the same as it's width.
My custom view extends View class and override the onDraw method...

I can't figure out how to tell my view to take height=width within the
linear layout.
Is it possible using onLayout, onsizeChanged, onMeasure
And what should i do with this method

In onMeasure I guess I should tell that measuredHeight should be the
same as measureWidth wich should be equals to the linearLayout
width... but How can I be aware at this time (onMeasure) of the width
of my contentLayout (linearLayout) ?

Thx

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to