Post a Runnable to execute setNewZoomScale when
WebView's onSizeChanged is called. This will ensure requestLayout of the Child View works. Fix http://b/issue?id=2323445
This commit is contained in:
@ -3798,9 +3798,17 @@ public class WebView extends AbsoluteLayout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we always force, in case our height changed, in which case we still
|
// onSizeChanged() is called during WebView layout. And any
|
||||||
// want to send the notification over to webkit
|
// requestLayout() is blocked during layout. As setNewZoomScale() will
|
||||||
setNewZoomScale(mActualScale, true);
|
// call its child View to reposition itself through ViewManager's
|
||||||
|
// scaleAll(), we need to post a Runnable to ensure requestLayout().
|
||||||
|
post(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
// we always force, in case our height changed, in which case we
|
||||||
|
// still want to send the notification over to webkit
|
||||||
|
setNewZoomScale(mActualScale, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user