Fix smartspace width when scaling
This commit is contained in:
1 parent
cef65bba26
commit
e31add95cc
1 file changed
+2
-1
@@ -78,8 +78,9 @@ class BcSmartspaceView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
val scale = height.toFloat() / smartspaceHeight.toFloat()
|
||||
val width = (MeasureSpec.getSize(widthMeasureSpec).toFloat() / scale).roundToInt()
|
||||
super.onMeasure(
|
||||
makeMeasureSpec((height.toFloat() / scale).roundToInt(), EXACTLY),
|
||||
makeMeasureSpec(width, EXACTLY),
|
||||
makeMeasureSpec(smartspaceHeight, EXACTLY)
|
||||
)
|
||||
scaleX = scale
|
||||
|
||||
Reference in new issue
Block a user