You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
View.requestLayout(): avoid recursion
Calling this method recursively can confuse Views that overwrite it.
This commit is contained in:
@@ -1536,11 +1536,15 @@ public class View implements Drawable.Callback {
|
||||
public boolean removeCallbacks(Runnable action) {return false;}
|
||||
|
||||
public void requestLayout() {
|
||||
layoutRequested = true;
|
||||
if (parent instanceof View && !parent.isLayoutRequested()) {
|
||||
((View)parent).requestLayout();
|
||||
}
|
||||
native_requestLayout(widget);
|
||||
View view = this;
|
||||
while (!view.layoutRequested) {
|
||||
view.layoutRequested = true;
|
||||
if (view.parent instanceof View)
|
||||
view = (View)view.parent;
|
||||
else
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
public void setOverScrollMode(int mode) {}
|
||||
|
||||
Reference in New Issue
Block a user