我正在尝试像这样在 json 中使用 GridLayout,
{
"type": "GridLayout",
"android": "http://schemas.android.com/apk/res/android",
"orientation": "horizontal",
"layout_width": "match_parent",
"layout_height": "match_parent",
"columnCount": "2",
"rowCount": "2",
"children": [
{
"type": "TextView",
"layout_width": "wrap_content",
"layout_height": "wrap_content",
"layout_columnWeight": "1",
"layout_marginTop": "8dp",
"layout_marginLeft": "16dp",
"textSize": "20dp",
"textColor": "@android:color/background_dark",
"text": "244536"
},
{
"type": "TextView",
"layout_width": "wrap_content",
"layout_height": "wrap_content",
"layout_columnWeight": "1",
"layout_marginTop": "8dp",
"layout_marginLeft": "16dp",
"textSize": "20dp",
"textColor": "@android:color/background_dark",
"text": "244536"
}
]
}
当我准备一个ProteusView
.
如果 proteus 不支持 GridLayout,有没有办法使用LinearLayout
或RelativeLayout
获得相同的结果