[android-developers] How come LinearLayout doesn't seem to measure wrap_content properly

2012-10-22 Thread Satya Komatineni
I am doing more research to see if this indeed is the case. But here are the symptoms LinearLayoutheight=wrap_conent textviewheight=wrap_content some-custom-circle-viewheight=wrap_content textview ..height=wrap_content /LinearLayout In the custom circleview constructor I set

Re: [android-developers] How come LinearLayout doesn't seem to measure wrap_content properly

2012-10-22 Thread Romain Guy
LinearLayout is doing the right thing. wrap_content results in an AT_MOST MeasureSpec. If you are writing a custom view that extends the base View class you really should override onMeasure(). On Mon, Oct 22, 2012 at 2:33 PM, Satya Komatineni satya.komatin...@gmail.com wrote: I am doing more

Re: [android-developers] How come LinearLayout doesn't seem to measure wrap_content properly

2012-10-22 Thread Satya Komatineni
Does wrap_content always result in AT_MOST? If it says 411 pixles at most, I would have thought I will take all of it because I could use that. I would not have thought to give back my content size. Just thinking aloud. what will match_parent do? Does that come in as EXACT, matching the size of

Re: [android-developers] How come LinearLayout doesn't seem to measure wrap_content properly

2012-10-22 Thread Romain Guy
When you receive an AT_MOST mesure spec you can return any size you want as long as it's = to the MeasureSpec's size. match_parent is indeed EXACTLY + size of the parent. On Mon, Oct 22, 2012 at 3:05 PM, Satya Komatineni satya.komatin...@gmail.com wrote: Does wrap_content always result in