widget_search.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <layout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto" >
  4. <data >
  5. <variable
  6. name="vm"
  7. type="com.quansu.heifengwuliu.vmodel.SearchVModel" />
  8. </data >
  9. <LinearLayout
  10. android:layout_width="match_parent"
  11. android:layout_height="wrap_content"
  12. android:focusable="true"
  13. android:focusableInTouchMode="true"
  14. android:orientation="vertical" >
  15. <LinearLayout
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:layout_marginLeft="18dp"
  19. android:layout_marginTop="12dp"
  20. android:layout_marginRight="18dp"
  21. android:layout_marginBottom="18dp"
  22. android:gravity="center_vertical"
  23. android:orientation="horizontal" >
  24. <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout
  25. android:layout_width="0dp"
  26. android:layout_height="40dp"
  27. android:layout_weight="1"
  28. android:focusable="true"
  29. android:focusableInTouchMode="true"
  30. android:gravity="center_vertical"
  31. android:orientation="horizontal"
  32. android:paddingLeft="10dp"
  33. android:paddingRight="10dp"
  34. app:qmui_backgroundColor="@color/white"
  35. app:qmui_borderColor="#BEBEBE"
  36. app:qmui_borderWidth="@dimen/dp_1"
  37. app:qmui_radius="@dimen/dp_4" >
  38. <ImageView
  39. android:layout_width="13dp"
  40. android:layout_height="13dp"
  41. android:src="@drawable/stock_serch" >
  42. </ImageView >
  43. <EditText
  44. android:id="@+id/et_name"
  45. android:layout_width="0dp"
  46. android:layout_height="match_parent"
  47. android:layout_marginLeft="15dp"
  48. android:layout_weight="1"
  49. android:background="@null"
  50. android:gravity="center_vertical"
  51. android:hint="请输入要搜索的内容"
  52. android:text="@={vm.k}"
  53. android:textColor="#2F2F31"
  54. android:textColorHint="#929390"
  55. android:textSize="14sp"
  56. app:on_action="@{(a,b,c)->vm.onAction(b)}" />
  57. <ImageView
  58. android:id="@+id/iv_delete"
  59. android:layout_width="14dp"
  60. android:layout_height="14dp"
  61. android:layout_marginLeft="10dp"
  62. android:src="@drawable/stock_delete" >
  63. </ImageView >
  64. </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundLinearLayout >
  65. <TextView
  66. android:id="@+id/tv_search"
  67. android:layout_width="wrap_content"
  68. android:layout_height="wrap_content"
  69. android:layout_marginLeft="18dp"
  70. android:gravity="center|left"
  71. android:onClick="@{v->vm.firstReq()}"
  72. android:text="搜索"
  73. android:textColor="#3274F6"
  74. android:textSize="15sp" >
  75. </TextView >
  76. </LinearLayout >
  77. </LinearLayout >
  78. </layout >