Dear Chrono,

I have met exactly same problem with yours, and have tried solving it
exactly same as you. And I just find the solution, try to
requestLayout like this:

    @Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        // your operation...
        Handler handler = new Handler();
        handler.post(new Runnable(){
            public void run() {
                requestLayout();
            }
        });
    }

It looks like onSizeChanged is not invoked in UI thread. I haven't
fully understand Android UI thread stuff. Although the ScrollView is
correctly layout after a very short
timespan, anyway, the above codes can overcome our problem.

Good luck!

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

Reply via email to