{
    "template_info": {
        "sdk_version": "2.0.0"
    },
    "main_template": {
        "id": "frame_layout",
        "name": "FrameLayout",
        "width": "match_parent",
        "background": "44ffa000",
        "borderRadius": "6",
        "height": "wrap_content",
        "onTap": {
            "type": "clickEvent"
        },
        "children": [{
            "id": "VideoPlaceholder",
            "name": "VideoPlaceholder",
            "width": "match_parent",
            "ratio": "0.56",
            "layoutGravity": "center",
            "coverSrc": "${video.cover_url}",
            "src": "${video.video_url}",
            "onTap": {
                "type": "clickEvent"
            }
        }, {
            "id": "logo_container",
            "name": "FlexLayout",
            "width": "80",
            "height": "wrap_content",
            "flexDirection": "row",
            "layoutGravity": "left|top",
            "marginLeft": "17",
            "marginTop": "12",
            "children": [{
                "id": "ad_logo",
                "name": "Image",
                "width": "40",
                "height": "17",
                "flexShrink": "0",
                "alignSelf": "center",
                "src": "https://sf3-fe-tos.pglstatp-toutiao.com/obj/csj-sdk-static/resources/bu_logoAd.png",
                "scaleType": "fitXY",
                "visibility": "${adx_name==null||adx_name==''?'visible':'gone'}",
                "onTap": {
                    "type": "openPolicy"
                }
            }, {
                "id": "adx_logo",
                "name": "Text",
                "width": "wrap_content",
                "height": "17",
                "alignSelf": "center",
                "flexShrink": "0",
                "background": "#1F161823",
                "visibility": "${adx_name==null||adx_name==''?'gone':'visible'}",
                "textSize": "8",
                "text": "${adx_name}",
                "textColor": "#BFFFFFFF",
                "textAlign": "center",
                "borderRadius": "3",
                "padding": "2"
            }, {
                "id": "mute_image",
                "name": "Image",
                "width": "30",
                "height": "30",
                "marginLeft": "15",
                "padding": "7",
                "flexShrink": "0",
                "scaleType": "fitXY",
                "background": "#00222435",
                "src": "${setting.voice_control == true ? 'https://sf3-fe-tos.pglstatp-toutiao.com/obj/csj-sdk-static/resources/bu_voice_silent.png' : 'https://sf3-fe-tos.pglstatp-toutiao.com/obj/csj-sdk-static/resources/bu_voice.png'}",
                "onTap": {
                    "type": "muteVideo",
                    "video_control": "1",
                    "muteSrc": "https://sf3-fe-tos.pglstatp-toutiao.com/obj/csj-sdk-static/resources/bu_voice_silent.png",
                    "unmuteSrc": "https://sf3-fe-tos.pglstatp-toutiao.com/obj/csj-sdk-static/resources/bu_voice.png"
                }
            }]
        }, {
            "id": "dislike",
            "name": "Text",
            "width": "wrap_content",
            "height": "wrap_content",
            "text": "反馈",
            "marginRight": "16",
            "marginTop": "12",
            "paddingLeft": "8",
            "paddingRight": "8",
            "paddingTop": "5",
            "paddingBottom": "5",
            "layoutGravity": "right|top",
            "textColor": "#ffffff",
            "background": "#50000000",
            "textAlign": "center",
            "textSize": "14",
            "borderRadius": "14",
            "maxLines": "1",
            "onTap": {
                "type": "dislike"
            }
        }, {
            "id": "legacy_container",
            "name": "FlexLayout",
            "width": "match_parent",
            "height": "wrap_content",
            "marginLeft": "16",
            "flexDirection": "column",
            "visibility": "${interaction_type!=4||tpl_info.dynamic_creative.developer_name==null||dynamic_creative.developer_name==''||tpl_info.dynamic_creative.app_version==null||tpl_info.dynamic_creative.app_version==''?'gone':'visible'}",
            "marginTop": "50",
            "children": [{
                "id": "developer_name",
                "name": "Text",
                "width": "match_parent",
                "height": "wrap_content",
                "text": "${tpl_info.dynamic_creative.developer_name}",
                "textColor": "#FFFFFF",
                "textSize": "10",
                "shadowColor": "#26000000",
                "shadowRadius": "2",
                "shadowDx": "0",
                "shadowDy": "2",
                "maxLines": "1"
            }, {
                "id": "flex_legacy_container",
                "name": "FlexLayout",
                "width": "match_parent",
                "height": "wrap_content",
                "marginTop": "7",
                "flexDirection": "row",
                "children": [{
                    "id": "function_desc",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "text": "功能",
                    "textColor": "#FFFFFF",
                    "textSize": "10",
                    "shadowColor": "#26000000",
                    "shadowRadius": "2",
                    "shadowDx": "0",
                    "shadowDy": "2",
                    "onTap": {
                        "type": "openAppFunctionDesc"
                    }
                }, {
                    "id": "split_line_01",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "text": " | ",
                    "textColor": "#FFFFFF",
                    "textSize": "10",
                    "shadowColor": "#26000000",
                    "shadowRadius": "2",
                    "shadowDx": "0",
                    "shadowDy": "2",
                    "onTap": {
                        "type": "clickEvent"
                    }
                }, {
                    "id": "permission",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "text": "权限",
                    "textColor": "#FFFFFF",
                    "textSize": "10",
                    "shadowColor": "#26000000",
                    "shadowRadius": "2",
                    "shadowDx": "0",
                    "shadowDy": "2",
                    "onTap": {
                        "type": "openAppPermission"
                    }
                }, {
                    "id": "split_line_02",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "text": " | ",
                    "textColor": "#FFFFFF",
                    "textSize": "10",
                    "shadowColor": "#26000000",
                    "shadowRadius": "2",
                    "shadowDx": "0",
                    "shadowDy": "2",
                    "onTap": {
                        "type": "clickEvent"
                    }
                }, {
                    "id": "privacy_policy",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "text": "隐私",
                    "textColor": "#FFFFFF",
                    "textSize": "10",
                    "onTap": {
                        "type": "openAppPolicy"
                    }
                }, {
                    "id": "privacy_policy",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "marginLeft": "8",
                    "text": "${'版本号:' + tpl_info.dynamic_creative.app_version}",
                    "textColor": "#FFFFFF",
                    "textSize": "10",
                    "shadowColor": "#26000000",
                    "shadowRadius": "2",
                    "shadowDx": "0",
                    "shadowDy": "2",
                    "onTap": {
                        "type": "clickEvent"
                    }
                }]
            }]
        }, {
            "id": "bottom_card_container",
            "name": "FlexLayout",
            "width": "match_parent",
            "height": "wrap_content",
            "layoutGravity": "bottom",
            "background": "#57000000",
            "borderRadius": "5",
            "marginLeft": "16",
            "marginRight": "16",
            "marginBottom": "16",
            "flexDirection": "column",
            "children": [{
                "id": "top_container",
                "name": "FlexLayout",
                "width": "match_parent",
                "height": "70",
                "marginTop": "16",
                "marginLeft": "16",
                "marginRight": "16",
                "flexDirection": "row",
                "children": [{
                    "id": "card_icon",
                    "name": "Image",
                    "width": "70",
                    "height": "70",
                    "flexShrink": "0",
                    "borderRadius": "10",
                    "src": "${icon.url}",
                    "scaleType": "fitXY"
                }, {
                    "id": "bottom_text_container",
                    "name": "FlexLayout",
                    "width": "match_parent",
                    "height": "70",
                    "flexDirection": "column",
                    "marginLeft": "5",
                    "justifyContent": "space_between",
                    "children": [{
                        "id": "text_top_container",
                        "name": "FlexLayout",
                        "width": "match_parent",
                        "height": "wrap_content",
                        "flexDirection": "row",
                        "children": [{
                            "id": "card_title_text",
                            "name": "Text",
                            "width": "match_parent",
                            "height": "wrap_content",
                            "text": "${source==null||source==''?app.app_name:source}",
                            "textColor": "#FFFFFF",
                            "textStyle": "bold",
                            "textSize": "18",
                            "ellipsize": "end",
                            "maxLines": "1"
                        }]
                    }, {
                        "id": "card_content_text",
                        "name": "Text",
                        "width": "match_parent",
                        "height": "wrap_content",
                        "text": "${title}",
                        "textColor": "#FFFFFF",
                        "textSize": "14",
                        "maxLine": "2",
                        "ellipsize": "end"
                    }]
                }]
            }, {
                "id": "card_download_btn",
                "name": "Text",
                "width": "match_parent",
                "height": "36",
                "background": "#FA6725",
                "marginTop": "8",
                "marginBottom": "16",
                "marginLeft": "16",
                "marginRight": "16",
                "text": "${button_text==null||button_text==''?'查看详情':button_text}",
                "textAlign": "center",
                "textColor": "#ffffff",
                "borderRadius": "18",
                "textSize": "16"
            }]
        }, {
            "id": "corver_container",
            "name": "FrameLayout",
            "width": "match_parent",
            "height": "match_parent",
            "background": "#CC000000",
            "onTap": {
                "type": "clickEvent"
            },
            "visibility": "gone",
            "children": [{
                "id": "center_container",
                "name": "FlexLayout",
                "width": "match_parent",
                "height": "wrap_content",
                "flexDirection": "column",
                "layoutGravity": "center",
                "marginLeft": "55",
                "marginRight": "55",
                "alignItems": "center",
                "children": [{
                    "id": "logo_image",
                    "name": "Image",
                    "width": "70",
                    "height": "70",
                    "marginTop": "0",
                    "scaleType": "fitXY",
                    "src": "${icon.url}",
                    "borderRadius": "10"
                }, {
                    "id": "logo_text",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "text": "${source==null||source==''?app.app_name:source}",
                    "paddingLeft": "2",
                    "paddingRight": "2",
                    "paddingTop": "2",
                    "paddingBottom": "2",
                    "marginTop": "12",
                    "textColor": "#ffffff",
                    "textAlign": "center",
                    "textStyle": "bold",
                    "textSize": "20",
                    "borderRadius": "2",
                    "maxLines": "1",
                    "alignSelf": "center"
                }, {
                    "id": "cover_content_text",
                    "name": "Text",
                    "width": "wrap_content",
                    "height": "wrap_content",
                    "text": "${title}",
                    "paddingLeft": "2",
                    "paddingRight": "2",
                    "paddingTop": "2",
                    "paddingBottom": "2",
                    "marginTop": "12",
                    "textColor": "#ffffff",
                    "textAlign": "center",
                    "textSize": "16",
                    "borderRadius": "2",
                    "ellipsize": "end",
                    "maxLines": "2",
                    "alignSelf": "center"
                }, {
                    "id": "button",
                    "name": "Text",
                    "width": "match_parent",
                    "height": "36",
                    "text": "${button_text==null||button_text==''?'查看详情':button_text}",
                    "paddingLeft": "4",
                    "paddingRight": "4",
                    "paddingTop": "5",
                    "paddingBottom": "5",
                    "marginTop": "20",
                    "textColor": "#ffffff",
                    "background": "#FA6725",
                    "textAlign": "center",
                    "textSize": "15",
                    "borderRadius": "18",
                    "maxLines": "1",
                    "alignSelf": "center"
                }]
            }]
        }]
    }
}
