Fix hotseat search bar position in rtl

This commit is contained in:
Suphon Thanakornpakapong
2021-06-09 20:27:27 +07:00
parent 7ca5f93f82
commit ff11f2d1d0
@@ -219,7 +219,10 @@ class AllAppsHotseatQsb @JvmOverloads constructor(context: Context, attrs: Attri
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
super.onLayout(changed, left, top, right, bottom)
translationX = (-negativeMargin).toFloat()
translationX = when (layoutDirection) {
LAYOUT_DIRECTION_RTL -> negativeMargin
else -> -negativeMargin
}.toFloat()
}
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {