Here is my requirement:
I need to display a verbose text inside a list element on the main page of my app for which I am using a TextArea. Now my list is rendered using a renderer defined in the GUI and Text Area is part of the renderer. The font size of this text displayed inside the text area has to vary based on the device size so that on larger devices the font is large and on smaller devices it is small.
For example I want
small font size for device height < 500
medium font size for device height > 500 & height < 2000
large font size for device height > 2000
Things that I tried to accomplish this
1. Have a hard coded renderer which defines the font size programmatically. This soln works but gets complicated as my main list size increases and also there is complex code to be executed on clicking the list item.
2. Stick to the GUI based renderer and try to access the TextArea inside the code and dynamically change its font size. This soln didnt work for me because I wasn't able to access
the TextArea defined in the GUI renderer inside my code. I tried to access the same inside the beforeShow, onCreate functions of the renderer but it is always null.
3. Set the font size for the "ContentPane" UUID at the global level so that any component that used the "ContentPane" UUID will have its font size set dynamically. Not sure how this can be done.
Please guide me on how to proceed here. Also, it might be a dumb question, but I am not sure what is the relationship between say font size for a particular theme and the device size and resolution. How does one reconcile the two to have a consistent viewing experience across devices.
Thanks,
Shashank