It seems to be a skin issue for many device skins.
These skins show big buttons when the size is from the material icon set. 
They also show that the cm length is big.

The cm length is meant to be what the simulator CEF BrowserComponent shows 
as a fixed value. It is not a real cm I think but this is another issue of 
Milestone 7.0.  It is the same whatever device is chosen as skin, it is 
sometime blatantly wrong because it is in the simulator, not the device.

So let's consider just the differences from right and wrong cm measure from 
dpi value.

(Other buttons are instead sized according the dpi constant (not the dpi 
value) with hard coded measure from the Android version of my app, for 
example 32,48,72 and so on, they happen to be re right, so they will not be 
considered.)

Some skins with big buttons (material icon set) and big cm length:
Note5, Pixel2XL, Pixel, Pixel2, HTCA9, HTCM8,Nexus5X,Nexus6P, S8

skins with small buttons (material icon set) and big cm length
iPhone6PLus, iPhone7XPlus, iPhone8Plus, X

skins that have big button size (material icon set) and right cm length, 
for example:
MotoE, MotoG, Nexus4, GrandPrime, S3,iPhone5c

skins with small buttons (material icon set) and right cm length
iPhone6S, iPhone7, iPhone8
Il giorno mercoledì 6 gennaio 2021 alle 04:19:18 UTC+1 Shai Almog ha 
scritto:

> Look at the skin file properties file to see the ratio variable used to 
> calculate the density of the display. Maybe there was a mistake in 
> generating this specific theme file. 
> You can see the skins here: 
> https://github.com/codenameone/codenameone-skins
> On Tuesday, January 5, 2021 at 1:37:01 PM UTC+2 P5music wrote:
>
>> This question is related to
>>
>> https://groups.google.com/g/codenameone-discussions/c/ohobrY3v83s/m/ypQ8fmnvAQAJ
>>
>> In my code there is the need to have a standard length. The instruction 
>> to do so is:
>>
>> int frameHeight= (int) (Utils.dpi()* 0.393701);
>>
>> This should be a centimeter. 
>> (Utils.dpi() is a convenience method to get the dpi from the Display.
>> getInstance().getDeviceDensity() value)
>>
>> I tested it with two skins:
>>
>> Android Note5 (dpi=540 xxhdpi -> 212px)
>>
>> iOS iPad3  (dpi=240 hdpi -> 94px)
>>
>> The length measure is used in some HTML, displayed in a BrowserComponent.
>>
>> When running in simulator I get that
>> the device is different - OK
>> the font size and the icons size or images size are the same - OK
>> the calculated pixels value for 1cm has different size, it is bigger in 
>> the Note5 skin.
>>
>> Should I use CN.convertToPixels()?
>>
>> Thanks in advance
>>
>>

-- 
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/94ff9513-d6f1-49e2-adbc-676f2410a6a2n%40googlegroups.com.

Reply via email to