proteus支持GridLayout吗?如果没有,那有什么替代方法?

时间:2019-07-11 08:26:05

标签: android-gridlayout proteus

我正在尝试像这样在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,是否可以使用LinearLayoutRelativeLayout来获得相同的结果

1 个答案:

答案 0 :(得分:1)

Proteus当前没有 IF (ii .IN. list1) THEN 1 Error: Operands of user operator 'in' at (1) are INTEGER(4)/INTEGER(4) 的实现;但是您可以自己实现GridLayout的解析器并使用它。检出一个名为CircleViewParserhow to register it的自定义解析器的示例。

或者,您可以将GridLayoutLinearLayout一起使用。

layout_weight