Hello @Aditya_Singh, I rewrite your procedure with Schema, check this out:
{
"name": "Fully Customizable ChatView",
"metadata-version": 1,
"author": "Aditya_Singh (rewritten by WaterMelonIce)",
"platforms": [
"Kodular"
],
"keys": [
"id",
"message",
"msgTextColor",
"msgFontSize",
"msgTypefaceImport",
"timestamp",
"timestampTextColor",
"timestampFontSize",
"timestampTypefaceImport",
"containerRadius",
"cardViewBgColor",
"cardViewWidthPercent",
"AlignHorizontal"
],
"components": [
{
"id":"SpaceView1_{id}",
"type":"SpaceView",
"properties":{
"HeightPercent":1,
"Width":-2
}
},
{
"id":"HorizontalArrangement1_{id}",
"type":"HorizontalArrangement",
"properties":{
"AlignHorizontal":"{AlignHorizontal}",
"AlignVertical":2,
"Width":-2
},
"components": [
{
"id":"CardView1_{id}",
"type":"MakeroidCardView",
"properties":{
"FullClickable":true,
"AlignHorizontal":3,
"AlignVertical":1,
"BackgroundColor":"{cardViewBgColor}",
"CornerRadius":"{containerRadius}",
"WidthPercent":"{cardViewWidthPercent}"
},
"components": [
{
"id":"HorizontalArrangement2_{id}",
"type":"HorizontalArrangement",
"properties":{
"Width":-2,
"AlignHorizontal":1,
"AlignVertical":2
},
"components": [
{
"id":"msgLabel_{id}",
"type":"Label",
"properties":{
"Text":"{message}",
"TextColor":"{msgTextColor}",
"FontSize":"{msgFontSize}",
"FontTypefaceImport":"{msgTypefaceImport}"
}
}
]
},
{
"id":"SpaceView2_{id}",
"type":"SpaceView",
"properties":{
"HeightPercent":1,
"Width":-2
}
},
{
"id":"HorizontalArrangement3_{id}",
"type":"HorizontalArrangement",
"properties":{
"Width":-2,
"AlignHorizontal":2,
"AlignVertical":2
},
"components": [
{
"id":"timestampLabel_{id}",
"type":"Label",
"properties":{
"Text":"{timestamp}",
"TextColor":"{timestampTextColor}",
"FontSize":"{timestampFontSize}",
"FontTypefaceImport":"{timestampTypefaceImport}"
}
}
]
}
]
}
]
}
]
}
CustomChatView (Schema rewritten).aia (76.8 KB)
I added the scroll handler by ColinTree, which can scroll to bottom automatically.
Btw, the the procedure is quite different, because you can’t do if then else
in Schema, I changed the inputs a bit.