api-impl: add TableLayout from AOSP

This commit is contained in:
Mis012
2024-03-21 16:19:19 +01:00
parent 50fa760c63
commit 5af3fa9e79
4 changed files with 1336 additions and 2 deletions

View File

@@ -360,12 +360,16 @@ public class ViewGroup extends View implements ViewParent, ViewManager {
public LayoutParams(Context context, AttributeSet attrs) {
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ViewGroup_Layout);
width = a.getLayoutDimension(R.styleable.ViewGroup_Layout_layout_width, "layout_width");
height = a.getLayoutDimension(R.styleable.ViewGroup_Layout_layout_height, "layout_height");
setBaseAttributes(a, R.styleable.ViewGroup_Layout_layout_width, R.styleable.ViewGroup_Layout_layout_height);
this.gravity = attrs.getAttributeIntValue("http://schemas.android.com/apk/res/android", "layout_gravity", -1);
a.recycle();
}
protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) {
width = a.getLayoutDimension(widthAttr, "layout_width");
height = a.getLayoutDimension(heightAttr, "layout_height");
}
public void resolveLayoutDirection(int layoutDirection) {}
/**

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -441,6 +441,8 @@ hax_jar = jar('hax', [
'android/widget/Spinner.java',
'android/widget/SpinnerAdapter.java',
'android/widget/Switch.java',
'android/widget/TableLayout.java',
'android/widget/TableRow.java',
'android/widget/TextView.java',
'android/widget/Toast.java',
'android/widget/Toolbar.java',