02-09-2018 12:21
02-09-2018 12:21
I have a scrollview item in my index.gui that I have set the height to 500 on.
I have some textInputs in my app settings. When they are filled out it adjusts the scrollview height accordingly up to a height of 700.
So if if:
If inuput A is filled out - Scrollview height is set to 550
If inuput B is filled out - Scrollview height is set to 600
If inuput C is filled out - Scrollview height is set to 650
I also have it set to work in reverse if the settings are cleared the scrollview height returns accordingly to 500.
I am writing all the inputs to a json file on the device.
All fo this is working great until I turn bluetooth off (effectivley severing the link) and the app pulls the data from the json file that was written. When I launch the app free from the device, the scrollview height is set the default (500) instead of what was last recorded (650 for example).
Is there a way to write the current scrollview height to the json file, so that if it loses connection with the phone it will know what height it should be?
Answered! Go to the Best Answer.
02-09-2018 12:48
02-09-2018 12:48
Found the answer myself.
When writing the file, declare the scrollview and assign it a json key and value. Then read that value on startup.
02-09-2018 12:48
02-09-2018 12:48
Found the answer myself.
When writing the file, declare the scrollview and assign it a json key and value. Then read that value on startup.