Browse Source

[feat]键盘插件,权限提示,UI调整

hezihao 8 months ago
parent
commit
fd9a663a6c

+ 1 - 0
plugins/keyboard_android/android/src/main/kotlin/com/atmob/keyboard_android/component/child/impl/PermissionTipComponent.kt

@@ -33,6 +33,7 @@ class PermissionTipComponent @JvmOverloads constructor(
         vTip.text = context.resources.getString(R.string.paste_permission_tip)
         vCloseBtn.click {
             // 关闭提示条
+            hide()
         }
     }
 

+ 0 - 10
plugins/keyboard_android/android/src/main/res/layout/component_ai_keyboard.xml

@@ -7,16 +7,6 @@
     tools:background="@mipmap/bg_keyboard"
     tools:layout_height="wrap_content">
 
-    <com.atmob.keyboard_android.component.child.impl.PermissionTipComponent
-        android:id="@+id/permission_tip"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="12dp"
-        android:layout_marginTop="8dp"
-        android:layout_marginEnd="12dp"
-        android:visibility="gone"
-        tools:visibility="visible" />
-
     <com.atmob.keyboard_android.component.base.RouteComponent
         android:id="@+id/ai_keyboard_route_component"
         android:layout_width="match_parent"

+ 12 - 1
plugins/keyboard_android/android/src/main/res/layout/component_key_board_container.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="@dimen/keyboard_height"
     android:background="@mipmap/bg_keyboard"
@@ -12,12 +13,22 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="16dp" />
 
+    <com.atmob.keyboard_android.component.child.impl.PermissionTipComponent
+        android:id="@+id/permission_tip"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="12dp"
+        android:layout_marginTop="9dp"
+        android:layout_marginEnd="12dp"
+        android:visibility="gone"
+        tools:visibility="visible" />
+
     <!-- 键盘内容 -->
     <FrameLayout
         android:id="@+id/keyboard_content"
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:layout_marginTop="16dp"
+        android:layout_marginTop="9dp"
         android:layout_weight="1">
 
         <!-- 拼音键盘 -->

+ 10 - 5
plugins/keyboard_android/android/src/main/res/layout/component_permission_tip.xml

@@ -25,12 +25,17 @@
             android:textSize="11sp"
             android:textStyle="normal" />
 
-        <ImageView
+        <FrameLayout
             android:id="@+id/close_btn"
-            android:layout_width="10dp"
-            android:layout_height="10dp"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
             android:layout_marginStart="8dp"
-            android:layout_marginEnd="8dp"
-            android:src="@mipmap/ic_close" />
+            android:padding="10dp">
+
+            <ImageView
+                android:layout_width="10dp"
+                android:layout_height="10dp"
+                android:src="@mipmap/ic_close" />
+        </FrameLayout>
     </LinearLayout>
 </FrameLayout>