the hirarchy ?
It's created in runtime
FramLayout
|
-------------CanvasView(extends view) - responsible for drawing
our UI, overrides onSizeChanged and onDraw.
|
------------- EditText, used for binding our UI's focused
textFields to android's.
So when resize happens:
1. FrameLayout onMeasure is called.
1.1 CanvasView onMeasure is called.
1.2 EditText onMeasure is called <-- problem since new LayoutParams
are not set yet!
2. onLayout called on FrameLayout <-- here the FramLayout will use the
meausredWidth of Edit Text to lay it out.But the size is wrong
3. onSizeChanged is called on FrameLayout and CanvasView <--- here the
new LayoutParams are set for EditText.
what i need is step no 4: cause onMeasure to be called again, at least
on EditText and onLayout for FrameLayout, can't manage to do it.
On Feb 18, 12:31 am, skink <[email protected]> wrote:
> On Feb 17, 10:13 pm, skink <[email protected]> wrote:
>
> > On Feb 17, 10:01 pm, poohtbear <[email protected]> wrote:
>
> > > setMeasuredDimension(int, int) takes the size you want the view to be,
> > > this is why you have to call it in the end of onMeasure() the params
> > > you writ are parameters to onMeasure() no setMEasureDimension().
>
> > my question was if you just pass parameters like 100. 50 which is
> > wrong way.
>
> > you have to pass values returned by MeasureSpec#makeMeasureSpec method
>
> > pskink
>
> i'm sorry, yes, you are right, i mixed up onMeasure with
> setMEasureDimension
>
> again my apologies
>
> pskink
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en