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