Increase padding in AndroidUtils.getPopupMenuWidth

This commit is contained in:
Alex Sytnyk 2018-08-08 16:49:23 +03:00
parent fbacf142d0
commit c546af94c5

View file

@ -90,7 +90,7 @@ object AndroidUtils {
val paint = Paint().apply { textSize = txtSize.toFloat() } val paint = Paint().apply { textSize = txtSize.toFloat() }
val maxTextWidth = titles.map { paint.measureText(it) }.max() val maxTextWidth = titles.map { paint.measureText(it) }.max()
if (maxTextWidth != null) { if (maxTextWidth != null) {
val maxItemWidth = maxTextWidth.toInt() + AndroidUtils.dpToPx(ctx, 32f) val maxItemWidth = maxTextWidth.toInt() + AndroidUtils.dpToPx(ctx, 33f)
val minWidth = AndroidUtils.dpToPx(ctx, 100f) val minWidth = AndroidUtils.dpToPx(ctx, 100f)
return maxOf(minWidth, maxItemWidth) return maxOf(minWidth, maxItemWidth)
} }