activity_search.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:background="@color/white"
  7. android:clipToPadding="true"
  8. android:fitsSystemWindows="true"
  9. android:orientation="vertical">
  10. <LinearLayout
  11. android:layout_width="match_parent"
  12. android:layout_height="@dimen/app_nav_toolbar_height"
  13. android:background="@color/white"
  14. android:gravity="center_vertical"
  15. android:orientation="horizontal">
  16. <ImageButton
  17. android:id="@+id/ibtn_act_serach"
  18. android:layout_width="@dimen/app_nav_toolbar_height"
  19. android:layout_height="@dimen/app_nav_toolbar_height"
  20. android:background="@null"
  21. android:scaleType="centerInside"
  22. android:src="@drawable/ic_arrow_back_24dp" />
  23. <RelativeLayout
  24. android:layout_width="0dp"
  25. android:layout_height="match_parent"
  26. android:layout_weight="1"
  27. android:gravity="center_vertical">
  28. <AutoCompleteTextView
  29. android:id="@+id/edt_act_search_keyword"
  30. style="@style/B1"
  31. android:layout_width="match_parent"
  32. android:layout_height="@dimen/app_nav_height_tiny"
  33. android:layout_centerVertical="true"
  34. android:layout_weight="1"
  35. android:background="@drawable/sp_search_edt_white"
  36. android:completionThreshold="1"
  37. android:hint="@string/search_hint"
  38. android:maxLines="1"
  39. android:paddingLeft="15dip"
  40. android:singleLine="true"
  41. android:textColorHint="#c7c7c7" />
  42. <ImageView
  43. android:id="@+id/img_act_search_clear"
  44. android:layout_width="@dimen/app_nav_toolbar_height"
  45. android:layout_height="@dimen/app_nav_toolbar_height"
  46. android:layout_alignParentRight="true"
  47. android:layout_centerVertical="true"
  48. android:scaleType="centerInside"
  49. android:src="@drawable/search_delete"
  50. android:visibility="gone" />
  51. </RelativeLayout>
  52. <Button
  53. android:id="@+id/btn_act_search_search"
  54. android:layout_width="@dimen/app_nav_toolbar_height"
  55. android:layout_height="@dimen/app_nav_toolbar_height"
  56. android:background="@color/transparent"
  57. android:text="@string/action_search"
  58. android:textColor="@color/B" />
  59. </LinearLayout>
  60. <LinearLayout
  61. android:id="@+id/layout_activity_search_content"
  62. android:layout_width="match_parent"
  63. android:layout_height="match_parent"
  64. android:orientation="vertical"
  65. android:visibility="gone">
  66. <android.support.design.widget.TabLayout
  67. android:id="@+id/tabs_act_search"
  68. android:layout_width="match_parent"
  69. android:layout_height="wrap_content"
  70. android:background="@color/white"
  71. app:tabGravity="fill"
  72. app:tabIndicatorColor="?attr/main_color"
  73. app:tabIndicatorHeight="3dp"
  74. app:tabMode="fixed"
  75. app:tabSelectedTextColor="?attr/main_color"
  76. app:tabTextColor="@android:color/black">
  77. </android.support.design.widget.TabLayout>
  78. <android.support.v4.view.ViewPager
  79. android:id="@+id/viewpager_act_search"
  80. android:layout_width="match_parent"
  81. android:layout_height="match_parent" />
  82. </LinearLayout>
  83. <LinearLayout
  84. android:id="@+id/layout_activity_search_record"
  85. android:layout_width="match_parent"
  86. android:layout_height="match_parent"
  87. android:orientation="vertical">
  88. <TextView
  89. android:layout_width="match_parent"
  90. android:layout_height="wrap_content"
  91. android:layout_margin="5.0dip"
  92. android:drawableLeft="?line_short"
  93. android:drawablePadding="6dp"
  94. android:paddingLeft="5dip"
  95. android:text="@string/search_hot_keys" />
  96. <com.kfzs.android.view.tag.TagFlowLayout
  97. android:id="@+id/search_tagflow_layout"
  98. android:layout_width="match_parent"
  99. android:layout_height="wrap_content"
  100. android:layout_margin="5.0dip"
  101. app:max_select="1" />
  102. <TextView
  103. android:layout_width="match_parent"
  104. android:layout_height="wrap_content"
  105. android:layout_margin="5.0dip"
  106. android:drawableLeft="?line_short"
  107. android:drawablePadding="6dp"
  108. android:paddingLeft="5dip"
  109. android:text="@string/search_records" />
  110. <ListView
  111. android:id="@+id/search_history_listview"
  112. android:layout_width="match_parent"
  113. android:layout_height="match_parent"
  114. android:layout_marginLeft="5.0dip"
  115. android:layout_marginRight="5.0dip"
  116. android:footerDividersEnabled="false" />
  117. </LinearLayout>
  118. </LinearLayout>