loloof64
val cellsSize = with(DensityAmbient.current) { (size.toIntPx() * 0.1111) // Can I convert this result (which is px in Int) into an Sp unit, for a text ? }
André Kindwall
val cellsSize = with(DensityAmbient.current) { (size.toPx() * 0.1111f).toSp() }
val cellsSize = with(DensityAmbient.current) { Dp((size.toIntPx() * 0.1111).toFloat()).toSp() }
val cellsSize = with(DensityAmbient.current) { (size * 0.1111f).toSp() }
A modern programming language that makes developers happier.