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