Hello Jon,
I have set my flex below to WH as I just want the buttons and labels to maintain their ratio compared to the screen size. How would I set a frame size that auto-adjusting for each different device? Below is my UI code:
[
{
"nodes" : [
{
"nodes" : [
],
"frame" : "{{0, 653}, {768, 371}}",
"class" : "Label",
"attributes" : {
"uuid" : "34EA299A-E35A-4B5C-AEC2-B67AFD3CDB4C",
"flex" : "WH",
"corner_radius" : 0,
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"frame" : "{{70, 181}, {150, 32}}",
"number_of_lines" : 1,
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"border_width" : 0,
"alignment" : "center",
"alpha" : 1,
"text_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"text" : "Elilan Ganesathas 2018",
"font_name" : "<System-Bold>",
"class" : "Label",
"name" : "label6",
"font_size" : 12
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{257, 146}, {247, 36}}",
"class" : "Label",
"attributes" : {
"uuid" : "11097835-EEB2-4A81-8C61-15CE6E2C2A0C",
"flex" : "WH",
"corner_radius" : 9,
"background_color" : "RGBA(0.878431,0.878431,0.878431,1.000000)",
"frame" : "{{70, 181}, {150, 32}}",
"border_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"border_width" : 5,
"alignment" : "center",
"text_color" : "RGBA(0.030660,0.030660,0.029127,1.000000)",
"text" : "Basemap",
"font_name" : "<System-Bold>",
"class" : "Label",
"name" : "BASEMAP",
"font_size" : 18
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{257, 200}, {247, 133}}",
"class" : "TextField",
"attributes" : {
"uuid" : "1C82B89B-A4B5-4FBE-A060-F10AFC35E467",
"flex" : "WH",
"corner_radius" : 0,
"frame" : "{{45, 181}, {200, 32}}",
"border_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"border_width" : 0,
"tint_color" : "RGBA(0.500000,0.666667,1.000000,1.000000)",
"custom_attributes" : "{\"keyboard_type\":\nui.KEYBOARD_PHONE_PAD}",
"alignment" : "center",
"autocorrection_type" : "no",
"text_color" : "RGBA(1.000000,0.000000,0.000000,1.000000)",
"placeholder" : "_ _ _ _ _",
"text" : "",
"font_name" : "<System>",
"spellchecking_type" : "no",
"class" : "TextField",
"name" : "basemaptext",
"font_size" : 30
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{536, 146}, {164, 36}}",
"class" : "Label",
"attributes" : {
"uuid" : "7FF6FA7C-463C-4187-89D8-7658A3F3B5DE",
"flex" : "WH",
"corner_radius" : 9,
"background_color" : "RGBA(0.878431,0.878431,0.878431,1.000000)",
"frame" : "{{70, 181}, {150, 32}}",
"border_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"border_width" : 5,
"alignment" : "center",
"text" : "Block",
"font_name" : "<System-Bold>",
"class" : "Label",
"name" : "BLOCK",
"font_size" : 18
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{536, 200}, {164, 133}}",
"class" : "TextField",
"attributes" : {
"uuid" : "9FCE15C4-0B3C-4CCA-AF82-4D3C17588E94",
"flex" : "WH",
"frame" : "{{46, 181}, {200, 32}}",
"custom_attributes" : "{\"keyboard_type\":\nui.KEYBOARD_NUMBER_PAD}",
"alignment" : "center",
"autocorrection_type" : "default",
"text_color" : "RGBA(1.000000,0.000000,0.000000,1.000000)",
"placeholder" : "00",
"text" : "",
"font_name" : "<System>",
"spellchecking_type" : "default",
"class" : "TextField",
"name" : "blocktext",
"font_size" : 30
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{64, 146}, {164, 36}}",
"class" : "Label",
"attributes" : {
"uuid" : "80F99A57-609E-4531-9159-D6B23E31DACD",
"flex" : "WH",
"corner_radius" : 9,
"background_color" : "RGBA(0.878431,0.878431,0.878431,1.000000)",
"frame" : "{{70, 181}, {150, 32}}",
"border_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"border_width" : 5,
"alignment" : "center",
"text" : "Zone",
"font_name" : "<System-Bold>",
"class" : "Label",
"name" : "ZONE",
"font_size" : 18
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{197, 548}, {370, 89}}",
"class" : "Button",
"attributes" : {
"uuid" : "B59051F7-53EF-4D80-8F11-C01DB0D7E4FC",
"name" : "button1",
"flex" : "WH",
"corner_radius" : 9,
"background_color" : "RGBA(0.937500,1.000000,0.937500,1.000000)",
"frame" : "{{105, 181}, {80, 32}}",
"border_color" : "RGBA(0.000000,1.000000,0.000000,1.000000)",
"border_width" : 2,
"tint_color" : "RGBA(0.000000,0.882075,0.000000,1.000000)",
"custom_attributes" : "",
"title" : "Create",
"action" : "createbutton",
"font_bold" : true,
"class" : "Button",
"image_name" : "iob:flag_24",
"font_size" : 20
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{314, 384}, {172, 35}}",
"class" : "Label",
"attributes" : {
"uuid" : "95B8D196-F064-4D67-8196-6A46BF6A0D3E",
"flex" : "WH",
"corner_radius" : 9,
"background_color" : "RGBA(0.878431,0.878431,0.878431,1.000000)",
"frame" : "{{309, 496}, {150, 32}}",
"border_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"border_width" : 5,
"alignment" : "center",
"text" : "Waypoint ID",
"font_name" : "<System-Bold>",
"class" : "Label",
"name" : "label1",
"font_size" : 18
},
"selected" : true
},
{
"nodes" : [
],
"frame" : "{{64, 427}, {659, 98}}",
"class" : "TextField",
"attributes" : {
"name" : "waypointtext",
"text_color" : "RGBA(1.000000,0.000000,0.000000,1.000000)",
"flex" : "WH",
"frame" : "{{284, 496}, {200, 32}}",
"spellchecking_type" : "no",
"class" : "TextField",
"uuid" : "F1BBB0CA-847E-4EDE-B6EA-BA586A14F354",
"alignment" : "center",
"autocorrection_type" : "no",
"font_size" : 30,
"font_name" : "<System-Bold>"
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{64, 200}, {164, 133}}",
"class" : "TextField",
"attributes" : {
"uuid" : "2657EABF-340A-420D-BFA2-25B6CC3295D3",
"flex" : "WH",
"frame" : "{{45, 181}, {200, 32}}",
"custom_attributes" : "{\"keyboard_type\":\nui.KEYBOARD_PHONE_PAD}",
"alignment" : "center",
"autocorrection_type" : "no",
"action" : "",
"text_color" : "RGBA(1.000000,0.000000,0.000000,1.000000)",
"placeholder" : "_ _",
"font_name" : "<System>",
"spellchecking_type" : "no",
"class" : "TextField",
"name" : "zonetext",
"font_size" : 30
},
"selected" : false
},
{
"nodes" : [
],
"frame" : "{{333, 14}, {100, 100}}",
"class" : "ImageView",
"attributes" : {
"border_width" : 0,
"flex" : "WH",
"tint_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"frame" : "{{334, 462}, {100, 100}}",
"class" : "ImageView",
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"uuid" : "D38A39B4-BE84-4D0D-B2D0-5B235D404B57",
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"corner_radius" : 0,
"name" : "imageview1",
"image_name" : "iob:ios7_paperplane_outline_256"
},
"selected" : false
}
],
"frame" : "{{0, 0}, {768, 1024}}",
"class" : "View",
"attributes" : {
"flex" : "WH",
"custom_class" : "",
"enabled" : true,
"tint_color" : "RGBA(0.000000,0.478000,1.000000,1.000000)",
"border_color" : "RGBA(0.000000,0.000000,0.000000,1.000000)",
"background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)",
"name" : "Flight Buddy"
},
"selected" : false
}
]