keyboard_layout.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content"
  5. android:background="@android:color/holo_green_light"
  6. android:orientation="vertical"
  7. android:padding="5dp">
  8. <!-- 输入框 -->
  9. <EditText
  10. android:id="@+id/keyboard_input"
  11. android:layout_width="match_parent"
  12. android:layout_height="50dp"
  13. android:cursorVisible="false"
  14. android:focusable="false"
  15. android:hint="复制过来的文本"
  16. android:inputType="none"
  17. android:longClickable="true"
  18. android:textSize="18sp" />
  19. <!-- 数字键盘 + 操作按钮 -->
  20. <LinearLayout
  21. android:layout_width="match_parent"
  22. android:layout_height="wrap_content"
  23. android:orientation="horizontal"
  24. android:weightSum="4">
  25. <GridLayout
  26. android:id="@+id/number_pad"
  27. android:layout_width="0dp"
  28. android:layout_height="wrap_content"
  29. android:layout_weight="3"
  30. android:columnCount="3"
  31. android:rowCount="4"
  32. android:padding="5dp">
  33. <!-- 这里原有的静态按钮定义已全部删除 -->
  34. </GridLayout>
  35. <!-- 操作按钮 -->
  36. <LinearLayout
  37. android:layout_width="0dp"
  38. android:layout_height="wrap_content"
  39. android:layout_weight="1"
  40. android:orientation="vertical">
  41. <Button android:id="@+id/btn_paste" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="粘贴"/>
  42. <Button android:id="@+id/btn_delete" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="删除"/>
  43. <Button android:id="@+id/btn_clear" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="清空"/>
  44. <Button android:id="@+id/btn_send" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="发送"/>
  45. </LinearLayout>
  46. </LinearLayout>
  47. </LinearLayout>