android_layout_measure(): refactor to respect LayoutParams

This is needed when a Java widget gets measured from GTK
This commit is contained in:
Julian Winkler
2023-10-31 22:56:22 +01:00
committed by Julian Winkler
parent 8b6de0e83a
commit 3c03223085
6 changed files with 54 additions and 0 deletions

View File

@@ -26,6 +26,11 @@ public class FrameLayout extends ViewGroup {
return new LayoutParams(getContext(), attrs);
}
@Override
protected LayoutParams generateDefaultLayoutParams() {
return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
}
public static class LayoutParams extends ViewGroup.MarginLayoutParams {
public LayoutParams (Context c, AttributeSet attrs) {
super(c, attrs);