Using the hack doesn't work.
if i call to the setMeasuredDimension() with the dimensions i want
from the onLayout() of the layout it wont change the measured values.

So i need some help here :-)


On Feb 17, 5:56 pm, poohtbear <eyaltg...@gmail.com> wrote:
> Hi.
> I've got a ported application that doesn't use Android UI (our list
> screens and touch screens).
> We a FrameLayout that contains two children a View (that we use to
> paint on our UI) and an EditText which is usually invisible until we
> have a test field that we want to use in our own UI.
>
> To have our UI test field aligned with the android one, once the user
> press on our list item we set the layout params to set it to the right
> x and y (using margins) and the width and height, and request focus
> for the EditText item.
>
> This works great, however when resizing we always get the EditText
> with the previous screen's orientation's LayoutParams.
>
> A short test shows the reason: the layout calls onMeasure on itse;f
> and the children, only then does onResize is called on the View which
> resizs the list item we have in our UI, and only then the layout
> params is being assigned to the EditText. Of course it already to late
> as onMEasure was called already.
>
> What i need is for the onMeasure() of he textEdit to be called once
> the onSizedChanged() has finished.
>
> How can i do that ?
> I can create an ugly hack that if in the onLayout of the FramLayout
> the EditText's dimensions are not like the measured ones the call on
> setMeasuredDimension(int, int) to set the size i want.
> This is a pretty ugly hack though and can cause a lot of instability,
> so i'll appreciate other suggestions :-\
>
> requestLayout() in the onSizeChanged() didn't help as well (tried in
> the sizeChanged of the view, the layout and the EditText).

-- 
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