how about when am using CSS for my styles

On Monday, June 2, 2014 at 1:12:40 PM UTC+3, [email protected] wrote:
>
> Hi Folks,
>
> 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
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/24a0844f-0ec2-40dd-b9fd-9f0fa1419168o%40googlegroups.com.

Reply via email to