|
|
@@ -40,6 +40,7 @@ class AiKeyboardComponent @JvmOverloads constructor(
|
|
|
) : BaseUIComponent<IAiKeyboardComponent>(context, attrs, defStyleAttr), IAiKeyboardComponent {
|
|
|
private lateinit var vTabBarLayout: View
|
|
|
private lateinit var vMagicIndicator: MagicIndicator
|
|
|
+ private lateinit var vKeyboardKeyContent: View
|
|
|
private lateinit var vPasteBarLayout: View
|
|
|
private lateinit var vKeyList: RecyclerView
|
|
|
private lateinit var vPasteBtn: View
|
|
|
@@ -62,6 +63,7 @@ class AiKeyboardComponent @JvmOverloads constructor(
|
|
|
override fun findView(view: View) {
|
|
|
vTabBarLayout = view.findViewById(R.id.tar_bar_layout)
|
|
|
vMagicIndicator = view.findViewById(R.id.magic_indicator)
|
|
|
+ vKeyboardKeyContent = view.findViewById(R.id.keyboard_key_content)
|
|
|
vPasteBarLayout = view.findViewById(R.id.paste_bar_layout)
|
|
|
vKeyList = view.findViewById(R.id.key_list)
|
|
|
vPasteBtn = view.findViewById(R.id.paste_btn)
|
|
|
@@ -246,6 +248,14 @@ class AiKeyboardComponent @JvmOverloads constructor(
|
|
|
vKeyList.setVisible()
|
|
|
}
|
|
|
}
|
|
|
+ // 监听键盘选择页,是否显示
|
|
|
+ getKeyboardViewModel().keyboardSelectPageShowing.observe(getLifecycleOwner()) { isShowing ->
|
|
|
+ if (isShowing) {
|
|
|
+ vKeyboardKeyContent.setGone()
|
|
|
+ } else {
|
|
|
+ vKeyboardKeyContent.setVisible()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|