What is the unit for measuring the margin of a floating action button?

What is the unit for measuring the margin of a floating action button??

Capturemnh

Px/Dp if I’m not wrong

/Boban

2 Likes

There are already 2 options :sweat_smile:

2 Likes

I think they are PX (note that DP is not the same as PX)
@Mika can confirm

3 Likes

1 px = 1 dp

/Boban

2 Likes

I wanna show the floating action button in the very left side of the screen but I am unable to do so…Is there any way to do it?

Captureggg
**Floating buttion is not even showing in this coding.

px = dp * (dpi / 160)

1 Like

Yes they are Px i check that running on Px,

But I think there is no such tool in kodular to measure the dp or dpi for every individual device…right??

1 Like

But you can check your mobile screen size in dpi on any specifications website , they shows dpi of every device screen,

Since we work in 160dpi

1 = 1* (160/160)

/Boban

1 Like

Humm, don’t have some other devices other dpi?

Yes they do,

All this calculations happens in the background without user knowing about it, so 15dp will show 60px on density 4 screens or 640dpi

60px = 15dp x (640/160)

as I said 1px = 1dp

even the link you posted says the same thing

/Boban

Use minus 40 for mini and 56 for normal, add additional value to both if you want more margin from the edge ex.16 will be then 56 for mini and 72 for normal

/Boban

1 Like

Check again, do right click and do it on screen width block, what do you get?

  1. Px size of your phone
  2. Dp size of your phone

/Boban

Were these values helpful or are you still thoughtful

/Boban

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.