Closed mirzacharlie closed 4 years ago
Hey @mirzacharlie,
Could you please change the margin of the buttons from px to dp?
getDimension and getDimensionPixelSize methods of the Android SDK should help you convert DP to Pixels for use in the library. So you can retrieve your DP value and pass to one of the two methods above, and use the returned value when setting the margins.
Alternatively, please add an option like "firstFabOptionMarginPx" for the other option buttons.
firstFabOptionMarginPx is the margin between the first FabOption and the ExpandableFab button only. To change the margins between the other FabOptions, use successiveFabOptionMarginPx.
Hi, thx for your answer. This code works fine for me.
val px = TypedValue.applyDimension(
TypedValue.COMPLEX_UNIT_DIP,
32f,
resources.displayMetrics
)
fab.firstFabOptionMarginPx = px
fab.successiveFabOptionMarginPx = px
Could you please change the margin of the buttons from px to dp? Alternatively, please add an option like "firstFabOptionMarginPx" for the other option buttons.