[codenameone-discussions] Re: Scaling images fo tablet

2020-03-23 Thread Shai Almog
We don't load the image in all resolutions... We discard unnecessary data 
otherwise RAM would be packed with multi images.
Initializing the look and feel to create the theme implicitly loads the 
resources.

-- 
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 codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/cd9edbb5-f8b8-4a7e-a25c-9922e971cbab%40googlegroups.com.


[codenameone-discussions] Re: API Rest Full - Problem

2020-03-23 Thread Rubén V
Thanks

-- 
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 codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/28def604-8b0b-4794-bf28-d65841a72bb1%40googlegroups.com.


[codenameone-discussions] Re: Scaling images fo tablet

2020-03-23 Thread Gareth Murfin
oh it did work for some images, im just a little confused really, I know 
tablet should maximise screens better, but icons looking tiny is weird.. 
ill bring them in larger and reduce them via code for phone.

On Monday, March 23, 2020 at 8:03:16 PM UTC+8, Gareth Murfin wrote:
>
> Actually I cant figure out what youre doing there.. I never call 
> Resources.open, it seems to be done already when it comers into initVars? 
> Do I need to do it again and pass the dpi? And why isnt there simply a 
> version of getImage() that lets you get images from any DPI?
>
> Also it doesnt seem to work for me, no matter what I call it always gives 
> me back the same images:
>
> example inside initVars I do
>
> res= Resources.open("/theme.res", Display.DENSITY_LOW);
>
> or 
>
> res= Resources.open("/theme.res", Display.DENSITY_2HD);
>
> but the images still look identical?
>
> I expected them to be different sizes?
>
>
> On Saturday, February 8, 2020 at 1:25:52 PM UTC+8, Shai Almog wrote:
>>
>> Normally in an app you want to better use the tablet screen not to take 
>> up more room. I'm assuming this is for a game where the situation is a bit 
>> different sometimes. 
>> See the cn1pocker demo. It includes this:
>>
>> 
>> UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[0]));
>> cards = Resources.open("/gamedata.res", calculateDPI());
>>
>> Notice we give the target DPI explicitly which lets you determine the DPI 
>> you want on the given device.
>>
>>

-- 
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 codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/4efb1254-4431-489e-a9f5-3a1c27a053b5%40googlegroups.com.


[codenameone-discussions] Re: Scaling images fo tablet

2020-03-23 Thread Gareth Murfin
Actually I cant figure out what youre doing there.. I never call 
Resources.open, it seems to be done already when it comers into initVars? 
Do I need to do it again and pass the dpi? And why isnt there simply a 
version of getImage() that lets you get images from any DPI?

Also it doesnt seem to work for me, no matter what I call it always gives 
me back the same images:

example inside initVars I do

res= Resources.open("/theme.res", Display.DENSITY_LOW);

or 

res= Resources.open("/theme.res", Display.DENSITY_2HD);

but the images still look identical?

I expected them to be different sizes?


On Saturday, February 8, 2020 at 1:25:52 PM UTC+8, Shai Almog wrote:
>
> Normally in an app you want to better use the tablet screen not to take up 
> more room. I'm assuming this is for a game where the situation is a bit 
> different sometimes. 
> See the cn1pocker demo. It includes this:
>
> 
> UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[0]));
> cards = Resources.open("/gamedata.res", calculateDPI());
>
> Notice we give the target DPI explicitly which lets you determine the DPI 
> you want on the given device.
>
>

-- 
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 codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/389db72a-af3c-4d71-b3d8-5c76b5cbeadf%40googlegroups.com.