如何使按钮的角变圆? Viber 机器人

问题描述

{
"viber": {
    "type": "keyboard","inputFieldState": "hidden","buttons": [
        {
            "ActionBody": "/test","ActionType": "reply","BgColor": "#FF0000","Frame.CornerRadius": "4","Columns": 6,"Rows": 1,"Text": "<b><font color=\"#FFFFFF\">text</font></b>","TextHAlign": "center","TextSize": "regular","TextVAlign": "middle","Silent": false
        }
    ]
}}

我正在尝试通过参数“Frame.CornerRadius”:“4”来实现,但它不会那样工作,按钮保持矩形

解决方法

使用 Rich Media 消息类型并在那里添加键盘。示例:

{
    "Type": "rich_media","BgColor": "#FF0000","ButtonsGroupRows": 6,"ButtonsGroupColumns": 1,"Buttons": [
        {
            "ActionType": "reply","ActionBody": "/test","Columns": 6,"Rows": 1,"Text": "<b><font color=\"#FFFFFF\">text</font></b>",}
    ],}
,

试试这个

{
   "receiver":"OSpQxHz/54fXXjlrLEvDWg==","min_api_version":6,"type":"text","text":"Hello world","keyboard":{

    "DefaultHeight": true,"BgColor": "#FFFFFF","Buttons": [{
                   "Frame": {
            "BorderWidth": "01","BorderColor": "#51b46d","CornerRadius" :"9"
             },"BgColor": "#2db9b9","ActionBody": "www.tut.by","Image": "www.tut.by/img.jpg","Text": "Key text","TextVAlign": "middle","TextHAlign": "center","TextOpacity": 60,"TextSize": "regular"
        }]
   }
}