setDensity

suspend fun setDensity(dpi: Int?)(source)

Overrides the display density with dpi (100 to 1000), or with null goes back to the display's physical density, until detach, see setAnimations. Read back with DeviceInfo.densityDpi.