我正在尝试像这样在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
来获得相同的结果
答案 0 :(得分:1)
Proteus当前没有 IF (ii .IN. list1) THEN
1
Error: Operands of user operator 'in' at (1) are INTEGER(4)/INTEGER(4)
的实现;但是您可以自己实现GridLayout
的解析器并使用它。检出一个名为CircleViewParser
和how to register it的自定义解析器的示例。
或者,您可以将GridLayout
与LinearLayout
一起使用。
layout_weight