Files
Android-key-of-love/app/src/main/res/layout/my_keyboard.xml

143 lines
6.4 KiB
XML
Raw Normal View History

2025-11-26 16:47:15 +08:00
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rootCoordinator"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F6F7FB"
tools:context=".ui.home.MyKeyboard">
<ImageView
android:layout_width="match_parent"
2026-02-10 18:26:31 +08:00
android:layout_height="@dimen/sw_323dp"
2025-11-26 16:47:15 +08:00
android:src="@drawable/my_keyboard_bg"
android:scaleType="fitXY"
android:adjustViewBounds="true" />
2026-01-16 18:20:16 +08:00
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent">
2025-11-26 16:47:15 +08:00
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题和返回 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
2026-02-10 18:26:31 +08:00
android:padding="@dimen/sw_16dp"
2025-11-26 16:47:15 +08:00
android:gravity="center_vertical">
<!-- 返回按钮 -->
<FrameLayout
android:id="@+id/iv_close"
2026-02-10 18:26:31 +08:00
android:layout_width="@dimen/sw_46dp"
android:layout_height="@dimen/sw_46dp">
2025-11-26 16:47:15 +08:00
<ImageView
2026-02-10 18:26:31 +08:00
android:layout_width="@dimen/sw_13dp"
android:layout_height="@dimen/sw_13dp"
2025-11-26 16:47:15 +08:00
android:layout_gravity="center"
android:src="@drawable/more_icons"
android:rotation="180"
android:scaleType="fitCenter" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
2026-02-10 18:26:31 +08:00
android:layout_marginEnd="@dimen/sw_49dp"
2025-11-26 16:47:15 +08:00
android:gravity="center"
android:textStyle="bold"
2026-01-21 21:53:34 +08:00
android:text="@string/keyboard_title"
2025-11-26 16:47:15 +08:00
android:textColor="#1B1F1A"
2026-02-10 18:26:31 +08:00
android:textSize="@dimen/sw_16sp" />
2025-11-26 16:47:15 +08:00
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
2026-02-10 18:26:31 +08:00
android:minHeight="@dimen/sw_200dp"
android:padding="@dimen/sw_15dp"
android:layout_marginTop="@dimen/sw_90dp"
2025-11-26 16:47:15 +08:00
android:background="@drawable/mykeyboard_bg"
2026-01-15 13:01:31 +08:00
android:orientation="vertical">
2025-11-26 16:47:15 +08:00
2026-02-12 19:40:32 +08:00
<FrameLayout
android:id="@+id/keyboardListContainer"
2026-01-15 13:01:31 +08:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2026-02-12 19:40:32 +08:00
android:minHeight="@dimen/sw_200dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
tools:listitem="@layout/item_keyboard_character" />
<FrameLayout
android:id="@+id/noResultOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:clickable="true"
android:focusable="true"
android:importantForAccessibility="no">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:gravity="center_horizontal">
<ImageView
android:id="@+id/noResultImage"
android:layout_width="@dimen/sw_175dp"
android:layout_height="@dimen/sw_177dp"
android:src="@drawable/no_search_result"
android:scaleType="fitCenter"
android:contentDescription="@null"
android:importantForAccessibility="no" />
<TextView
android:id="@+id/noResultText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textAlignment="center"
android:text="@string/search_not_data"
android:textSize="@dimen/sw_13sp"
android:textColor="#1B1F1A"
android:includeFontPadding="false" />
</LinearLayout>
</FrameLayout>
</FrameLayout>
2025-11-26 16:47:15 +08:00
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
2026-01-16 18:20:16 +08:00
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
2026-01-15 13:01:31 +08:00
<TextView
android:id="@+id/btn_keyboard"
2026-02-10 18:26:31 +08:00
android:layout_width="@dimen/sw_343dp"
android:layout_height="@dimen/sw_45dp"
android:layout_marginBottom="@dimen/sw_16dp"
2026-01-15 13:01:31 +08:00
android:layout_gravity="bottom|center_horizontal"
android:gravity="center"
2026-01-21 21:53:34 +08:00
android:text="@string/save"
2026-01-15 13:01:31 +08:00
android:textColor="#FFFFFF"
2026-02-10 18:26:31 +08:00
android:textSize="@dimen/sw_16sp"
2026-01-15 13:01:31 +08:00
android:background="@drawable/my_keyboard_delete"
android:clickable="true"
android:focusable="true"/>
2026-01-16 18:20:16 +08:00
</androidx.coordinatorlayout.widget.CoordinatorLayout>