TP-56367 | Disable Default Scroll (#349)
This commit is contained in:
@@ -19,8 +19,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.OutlinedTextField
|
||||
import androidx.compose.material.Text
|
||||
@@ -154,7 +152,7 @@ fun LinkInflator(viewModel: LinkInflatorViewModel = hiltViewModel()) {
|
||||
shape = MaterialTheme.shapes.large,
|
||||
)
|
||||
|
||||
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
|
||||
Column {
|
||||
if (field.value.trim().isEmpty().not()) {
|
||||
LaunchedEffect(field.value.plus(refreshKey.intValue)) {
|
||||
viewModel.getJsonBlob(field.value.trim())
|
||||
|
||||
@@ -19,8 +19,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.OutlinedTextField
|
||||
import androidx.compose.material.Text
|
||||
@@ -132,7 +130,7 @@ fun PlaygroundScreen() {
|
||||
shape = MaterialTheme.shapes.large,
|
||||
)
|
||||
|
||||
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
|
||||
Column {
|
||||
if (field.value.trim().isEmpty().not()) {
|
||||
var errorMessage: String? = null
|
||||
val uiTronResponse: UiTronResponse? =
|
||||
|
||||
@@ -1,108 +1,117 @@
|
||||
{
|
||||
"listOfButtonWidgets": [
|
||||
{
|
||||
"title": "Button with text",
|
||||
"description": "This config is used to create a button with Rounded Corner Shape and a simple text on it.",
|
||||
"uiTronConfig": {
|
||||
"view": [{
|
||||
"property": {
|
||||
"shape": {
|
||||
"size": 100,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "back_cta_button_permission_footer_widget_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 0
|
||||
},
|
||||
"isStateFul": true
|
||||
},
|
||||
"childrenViews": [{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
"title": "Button with text",
|
||||
"description": "This config is used to create a button with Rounded Corner Shape and a simple text on it.",
|
||||
"uiTronConfig": {
|
||||
"view": [
|
||||
{
|
||||
"property": {
|
||||
"shape": {
|
||||
"size": 100,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "back_cta_button_permission_footer_widget_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 0
|
||||
},
|
||||
"isStateFul": true
|
||||
},
|
||||
"childrenViews": [
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"button_text": {
|
||||
"text": "Submit",
|
||||
"viewType": "Text"
|
||||
}
|
||||
}]
|
||||
}],
|
||||
"data": {
|
||||
"button_text": {
|
||||
"text": "Submit",
|
||||
"viewType": "Text"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
"title": "Button with text and trailing icon",
|
||||
"description": "This config is used to create a button with Rounded Corner Shape with a text and a trailing icon on the button.",
|
||||
"uiTronConfig": {
|
||||
"view": [{
|
||||
"property": {
|
||||
"shape": {
|
||||
"size": 100,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "back_cta_button_permission_footer_widget_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 0
|
||||
},
|
||||
"isStateFul": true
|
||||
},
|
||||
"childrenViews": [{
|
||||
"view": [
|
||||
{
|
||||
"property": {
|
||||
"width": "100",
|
||||
"height": "WRAP_CONTENT",
|
||||
"layoutId": "button_row",
|
||||
"viewType": "Row"
|
||||
},
|
||||
"childrenViews": [{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": {
|
||||
"width": "8",
|
||||
"height": "WRAP_CONTENT",
|
||||
"layoutId": "button_spacer",
|
||||
"viewType": "Spacer"
|
||||
}
|
||||
"shape": {
|
||||
"size": 100,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "back_cta_button_permission_footer_widget_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 0
|
||||
},
|
||||
"isStateFul": true
|
||||
},
|
||||
"childrenViews": [
|
||||
{
|
||||
"property": {
|
||||
"width": "16",
|
||||
"height": "16",
|
||||
"layoutId": "button_icon",
|
||||
"viewType": "Image"
|
||||
}
|
||||
"width": "100",
|
||||
"height": "WRAP_CONTENT",
|
||||
"layoutId": "button_row",
|
||||
"viewType": "Row"
|
||||
},
|
||||
"childrenViews": [
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": {
|
||||
"width": "8",
|
||||
"height": "WRAP_CONTENT",
|
||||
"layoutId": "button_spacer",
|
||||
"viewType": "Spacer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": {
|
||||
"width": "16",
|
||||
"height": "16",
|
||||
"layoutId": "button_icon",
|
||||
"viewType": "Image"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}]
|
||||
}],
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"button_text": {
|
||||
"text": "Text Label",
|
||||
@@ -119,63 +128,67 @@
|
||||
"title": "Button with text and a leading icon",
|
||||
"description": "This config is used to create a button with Rounded Corner Shape with a text and a leading icon on the button.",
|
||||
"uiTronConfig": {
|
||||
"view": [{
|
||||
"property": {
|
||||
"shape": {
|
||||
"size": 100,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "back_cta_button_permission_footer_widget_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 0
|
||||
},
|
||||
"isStateFul": true
|
||||
},
|
||||
"childrenViews": [{
|
||||
"view": [
|
||||
{
|
||||
"property": {
|
||||
"width": "100",
|
||||
"height": "WRAP_CONTENT",
|
||||
"layoutId": "button_row",
|
||||
"viewType": "Row"
|
||||
},
|
||||
"childrenViews": [{
|
||||
"property": {
|
||||
"width": "16",
|
||||
"height": "16",
|
||||
"layoutId": "button_icon",
|
||||
"viewType": "Image"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"property": {
|
||||
"width": "8",
|
||||
"height": "WRAP_CONTENT",
|
||||
"layoutId": "button_spacer",
|
||||
"viewType": "Spacer"
|
||||
}
|
||||
"shape": {
|
||||
"size": 100,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "back_cta_button_permission_footer_widget_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 0
|
||||
},
|
||||
"isStateFul": true
|
||||
},
|
||||
"childrenViews": [
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"width": "100",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
"layoutId": "button_row",
|
||||
"viewType": "Row"
|
||||
},
|
||||
"childrenViews": [
|
||||
{
|
||||
"property": {
|
||||
"width": "16",
|
||||
"height": "16",
|
||||
"layoutId": "button_icon",
|
||||
"viewType": "Image"
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": {
|
||||
"width": "8",
|
||||
"height": "WRAP_CONTENT",
|
||||
"layoutId": "button_spacer",
|
||||
"viewType": "Spacer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}]
|
||||
}],
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"button_text": {
|
||||
"text": "Text Label",
|
||||
@@ -192,41 +205,44 @@
|
||||
"title": "Outlined Rectangle Button",
|
||||
"description": "This config is used to create a button with rectangle shape with a text, shadow and a border.",
|
||||
"uiTronConfig": {
|
||||
"view": [{
|
||||
"property": {
|
||||
"shape": {
|
||||
"size": 100,
|
||||
"shapeType": null
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"borderStroke": {
|
||||
"width": 1,
|
||||
"color": "#FFFFFF"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "button_with_border_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 4
|
||||
},
|
||||
"isStateFul": false
|
||||
},
|
||||
"childrenViews": [{
|
||||
"view": [
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
}]
|
||||
}],
|
||||
"shape": {
|
||||
"size": 100
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"borderStroke": {
|
||||
"width": 1,
|
||||
"color": "#FFFFFF"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "button_with_border_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 4
|
||||
},
|
||||
"isStateFul": false
|
||||
},
|
||||
"childrenViews": [
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"button_text": {
|
||||
"text": "Submit",
|
||||
@@ -239,41 +255,45 @@
|
||||
"title": "Outlined Rounded Corner Shape Button",
|
||||
"description": "This config is used to create a button with rounded corner shape with a text, shadow and a border.",
|
||||
"uiTronConfig": {
|
||||
"view": [{
|
||||
"property": {
|
||||
"shape": {
|
||||
"size": 40,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"borderStroke": {
|
||||
"width": 1,
|
||||
"color": "#00FFFF"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "button_with_border_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 4
|
||||
},
|
||||
"isStateFul": false
|
||||
},
|
||||
"childrenViews": [{
|
||||
"view": [
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
}]
|
||||
}],
|
||||
"shape": {
|
||||
"size": 40,
|
||||
"shapeType": "RoundedCornerShape"
|
||||
},
|
||||
"width": "MATCH_PARENT",
|
||||
"colors": {
|
||||
"backgroundColor": "#22D081"
|
||||
},
|
||||
"borderStroke": {
|
||||
"width": 1,
|
||||
"color": "#00FFFF"
|
||||
},
|
||||
"height": "48",
|
||||
"layoutId": "button_with_border_id",
|
||||
"viewType": "Button",
|
||||
"elevation": {
|
||||
"defaultElevation": 4
|
||||
},
|
||||
"isStateFul": false
|
||||
},
|
||||
"childrenViews": [
|
||||
{
|
||||
"property": {
|
||||
"width": "WRAP_CONTENT",
|
||||
"height": "WRAP_CONTENT",
|
||||
"fontSize": 14,
|
||||
"layoutId": "button_text",
|
||||
"viewType": "Text",
|
||||
"textColor": "#FFFFFF",
|
||||
"fontFamily": "ttComposeFontFamily",
|
||||
"fontWeight": "TT_MEDIUM"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"data": {
|
||||
"button_text": {
|
||||
"text": "Next",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"listOfFormWidgets" : [
|
||||
"listOfFormWidgets": [
|
||||
{
|
||||
"title": "LabelWithName",
|
||||
"description": "This widget is used to input name. Tt also has validation on text enter.",
|
||||
|
||||
Reference in New Issue
Block a user