Fix search bar in rtl
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
package app.lawnchair.allapps
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Rect
|
||||
import android.util.AttributeSet
|
||||
import android.view.Gravity
|
||||
import com.android.launcher3.ExtendedEditText
|
||||
import com.android.launcher3.R
|
||||
import com.android.launcher3.allapps.AllAppsContainerView
|
||||
@@ -50,4 +52,12 @@ class FallbackSearchInputView(context: Context, attrs: AttributeSet?) : Extended
|
||||
super.onFocusChanged(focused, direction, previouslyFocusedRect)
|
||||
updateBackground()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
if (layoutDirection == LAYOUT_DIRECTION_RTL) {
|
||||
@SuppressLint("RtlHardcoded")
|
||||
gravity = Gravity.RIGHT or Gravity.CENTER
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user