小编Nat*_*ein的帖子

如何禁用BottomNavigationView转换模式?

BottomNavigationView不显示不活动的菜单标题.

如何在bottomNavigationBar中显示所有菜单元素的标题?问题是在我的情况下只显示了点击元素的标题.

在此输入图像描述

android android-support-design bottomnavigationview

139
推荐指数
10
解决办法
7万
查看次数

是否可以在React Native中动态创建组件?

是否可以在React Native中动态创建和添加视图组件?例如,首先我只有空屏幕,所有视图的信息都来自JSON中的服务器,然后需要在屏幕上生成它们.例如 - 应用程序从服务器获取json.这个json描述了必须构建的屏幕:

{
    "type": "linearlayout",
    "subviews": [{
        "type": "text",
        "fields": {
            "text": "This is text field"
        },
        "styles": {
            "color": "",
            "textSize": 14
        }
    }, {
        "type": "button",
        "fields": {
            "text": "JUST BUTTON"
        },
        "transition": {
            "name": "http://www.link.com"
        }
    }, {
        "type": "text",
        "fields": {
            "text": "This is another text field"
        },
        "styles": {
            "color": "",
            "textSize": 18
        }
    }]
}
Run Code Online (Sandbox Code Playgroud)

所以,通过JSON,我需要在React Native中动态构建视图.但我看不到任何在JSX中编写JS代码的能力 - 只有静态视图和动态更改道具

dynamic react-native

12
推荐指数
3
解决办法
1万
查看次数

来自JSON的Kotlin Jackson生成对象

请帮忙!我正在尝试使用jackson kotlin模块从JSON生成对象.这是json来源:

{
    "name": "row",
    "type": "layout",
    "subviews": [{
        "type": "horizontal",
        "subviews": [{
            "type": "image",
            "icon": "ic_no_photo",
            "styles": {
                "view": {
                    "gravity": "center"
                }
            }
        }, {
            "type": "vertical",
            "subviews": [{
                "type": "text",
                "fields": {
                    "text": "Some text 1"
                }
            }, {
                "type": "text",
                "fields": {
                    "text": "Some text 2"
                }
            }]
        }, {
            "type": "vertical",
            "subviews": [{
                "type": "text",
                "fields": {
                    "text": "Some text 3"
                }
            }, {
                "type": "text",
                "fields": {
                    "text": "Some text 4"
                }
            }]
        }, …
Run Code Online (Sandbox Code Playgroud)

json jackson kotlin

3
推荐指数
1
解决办法
1134
查看次数