How to add a button with Schema

   Guys I've created a list view with dynamic component by using Schema python code. In this list view I need to add 3 more buttons.
 How to create a button with schema code.

I’ve create a button, it is showing in the list but how it will be a clickable button…???
Please help me… Please some examples…

Post your schema here, in button’s properties you have to set "Enabled": true

1 Like

So What should be the button ID???
and should be the button key???
I Named it for the button is “id”: “Add_Plus_Button{id}”,
see on row number 263…

below is my schema code on python…

{
“name”: “Template_Creator”,
“metadata-version”: 1,
“extension_version”: 5,
“author”: “”,
“platforms”: [
creator.kodular.io
],
“keys”: [
“id”,
“image”,
“vegnoneveg”,
“name”,
“price”,
“strickprice”,
“strickvisible”,
“addbuttonvisible”,
“plusminusvisble”,
“quantity”
],
“components”: [
{
“id”: “Card_Product{id}”,
“type”: “MakeroidCardView”,
“properties”: {
“AlignVertical”: 2,
“ContentPaddingBottom”: 0,
“ContentPaddingLeft”: 0,
“ContentPaddingRight”: 0,
“ContentPaddingTop”: 0,
“CornerRadius”: 8,
“FullClickable”: false,
“Height”: -1016,
“Width”: -2
},
“components”: [
{
“id”: “Horizontal_Arrangement1{id}”,
“type”: “HorizontalArrangement”,
“properties”: {
“AlignVertical”: 2,
“BackgroundColor”: 4294967295,
“Height”: -2,
“Width”: -2
},
“components”: [
{
“id”: “Card_View1{id}”,
“type”: “MakeroidCardView”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 2,
“ContentPaddingBottom”: 0,
“ContentPaddingLeft”: 0,
“ContentPaddingRight”: 0,
“ContentPaddingTop”: 0,
“CornerRadius”: 8,
“Elevation”: 0,
“Height”: -2,
“Width”: -1036,
“StrokeColor”: 4290190364,
“StrokeWidth”: 1
},
“components”: [
{
“id”: “Product_Image{id}”,
“type”: “Image”,
“properties”: {
“Clickable”: true,
“Height”: -2,
“Width”: -1036,
“Picture”: “{image}”
}
}
]
},
{
“id”: “Vertical_Arrangement2{id}”,
“type”: “VerticalArrangement”,
“properties”: {
“AlignHorizontal”: 3,
“BackgroundColor”: 16777215,
“Height”: -2
},
“components”: [
{
“id”: “Space3{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: 6
}
},
{
“id”: “Image_Veg_NonVeg{id}”,
“type”: “Image”,
“properties”: {
“Height”: 14,
“Width”: 14,
“Picture”: “{vegnoneveg}”,
“ScalePictureToFit”: true
}
}
]
},
{
“id”: “Space4{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: -2,
“Width”: 4
}
},
{
“id”: “Vertical_Arrangement1{id}”,
“type”: “VerticalArrangement”,
“properties”: {
“BackgroundColor”: 16777215,
“Height”: -2,
“Width”: -2
},
“components”: [
{
“id”: “Product_Name_Label{id}”,
“type”: “Label”,
“properties”: {
“FontBold”: true,
“Text”: “{name}”
}
},
{
“id”: “Space7{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: -2,
“Width”: -2,
“Visible”: false
}
},
{
“id”: “Horizontal_Arrangement4{id}”,
“type”: “HorizontalArrangement”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 3,
“BackgroundColor”: 16777215,
“Height”: -2,
“Width”: -2
},
“components”: [
{
“id”: “Label_Indian_Currency{id}”,
“type”: “Label”,
“properties”: {
“FontSize”: 12,
“Text”: “\u20b9”
}
},
{
“id”: “Price_Label{id}”,
“type”: “Label”,
“properties”: {
“FontSize”: 14,
“Text”: “{price}”
}
},
{
“id”: “Space8{id}”,
“type”: “SpaceView”,
“properties”: {
“Width”: 4
}
},
{
“id”: “Strikethrough_Arrangement{id}”,
“type”: “HorizontalArrangement”,
“properties”: {
“AlignVertical”: 2,
“BackgroundColor”: 16777215,
“Visible”: “{strickvisible}”
},
“components”: [
{
“id”: “Strikethrough_Currency{id}”,
“type”: “Label”,
“properties”: {
“FontSize”: 12,
“HTMLFormat”: true,
“Text”: “\u20b9”,
“TextColor”: 4290190364
}
},
{
“id”: “Strickthrough_Price_Label{id}”,
“type”: “Label”,
“properties”: {
“FontSize”: 14,
“HTMLFormat”: true,
“Text”: “{strickprice}”,
“TextColor”: 4290190364
}
}
]
},
{
“id”: “Space8_copy{id}”,
“type”: “SpaceView”,
“properties”: {
“Width”: -2
}
},
{
“id”: “P_Button_Card_Arrangement{id}”,
“type”: “HorizontalArrangement”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 2,
“BackgroundColor”: 16777215,
“Height”: 36,
“Width”: 108
},
“components”: [
{
“id”: “Plus_Minus_Card{id}”,
“type”: “MakeroidCardView”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 2,
“BackgroundColor”: 16777215,
“ContentPaddingBottom”: 0,
“ContentPaddingLeft”: 0,
“ContentPaddingRight”: 0,
“ContentPaddingTop”: 0,
“CornerRadius”: 8,
“Elevation”: 0,
“Height”: 36,
“Width”: 108,
“StrokeColor”: 4290190364,
“StrokeWidth”: 1
},
“components”: [
{
“id”: “Horizontal_Arrangement5{id}”,
“type”: “HorizontalArrangement”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 2,
“BackgroundColor”: 4277980620,
“Height”: 36,
“Width”: 108,
“Visible”: “{addbuttonvisible}”
},
“components”: [
{
“id”: “Add_Plus_Button{id}”,
“type”: “Button”,
“properties”: {
“BackgroundColor”: 16777215,
“FontSize”: 14,
“Height”: -2,
“Width”: -2,
“Text”: “ADD +”,
“TextColor”: 4290190364,
“Enabled”: true
}
}
]
},
{
“id”: “Plus_Minus_Arrangement{id}”,
“type”: “HorizontalArrangement”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 3,
“BackgroundColor”: 4290190364,
“Height”: -2,
“Width”: -2,
“Visible”: “{plusminusvisble}”
},
“components”: [
{
“id”: “Space6{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: -2,
“Width”: -2
}
},
{
“id”: “Add_Button{id}”,
“type”: “Button”,
“properties”: {
“BackgroundColor”: 16777215,
“FontSize”: 14,
“Height”: 32,
“Width”: 32,
“Text”: “+”
}
},
{
“id”: “Space6_copy1{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: -2,
“Width”: -2
}
},
{
“id”: “Label_Quantity{id}”,
“type”: “Label”,
“properties”: {
“FontSize”: 16,
“Text”: “{quantity}”,
“TextAlignment”: 1,
“TextColor”: 4294967295
}
},
{
“id”: “Space6_copy{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: -2,
“Width”: -2
}
},
{
“id”: “Minus_Button{id}”,
“type”: “Button”,
“properties”: {
“BackgroundColor”: 16777215,
“FontSize”: 14,
“Height”: 32,
“Width”: 32,
“Text”: “-”
}
},
{
“id”: “Space6_copy1_copy{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: -2,
“Width”: -2
}
}
]
}
]
}
]
}
]
},
{
“id”: “Space7_copy{id}”,
“type”: “SpaceView”,
“properties”: {
“Height”: 2,
“Width”: -2
}
}
]
}
]
}
]
}
]
}