|
|
@@ -9,6 +9,7 @@ import android.util.SparseIntArray
|
|
|
import android.view.View
|
|
|
import androidx.annotation.IdRes
|
|
|
import androidx.appcompat.widget.LinearLayoutCompat
|
|
|
+import androidx.camera.core.ViewPort
|
|
|
import androidx.core.util.isEmpty
|
|
|
import androidx.core.view.children
|
|
|
import androidx.core.view.contains
|
|
|
@@ -131,8 +132,9 @@ class FloatLinearLayout @JvmOverloads constructor(
|
|
|
return this
|
|
|
}
|
|
|
|
|
|
- override fun onResume() {
|
|
|
+ override fun onResume(layoutDirection: Int) {
|
|
|
Log.d(TAG_FLOAT_LAYOUT_VIEW, "onResume")
|
|
|
+ this.layoutDirection = layoutDirection
|
|
|
reApplyLayoutTransition()
|
|
|
}
|
|
|
|
|
|
@@ -157,6 +159,8 @@ class FloatLinearLayout @JvmOverloads constructor(
|
|
|
override fun addFloatView(view: BaseLayoutFloatView) {
|
|
|
val index = getViewIndex(view.id)
|
|
|
Log.i(TAG_FLOAT_LAYOUT_VIEW, "addFloatView(index:$index) $view")
|
|
|
+ //兼容切语言后依赖appContext的layoutDirection不更新问题
|
|
|
+ view.layoutDirection = LAYOUT_DIRECTION_LOCALE
|
|
|
addView(view, index, view.layoutParams)
|
|
|
}
|
|
|
|