Prechádzať zdrojové kódy

1.城市选择页面和首页岗位页面搜索框调整

wsad5123 5 rokov pred
rodič
commit
c42dafa515

+ 8 - 10
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/home/CitySelectActivity.java

@@ -31,16 +31,18 @@ import butterknife.OnTextChanged;
 
 public class CitySelectActivity extends BaseActivity<CitySelectPresenter> implements CitySelectContacts.ICitySelectView {
 
-    @BindView(R.id.v_cancel)
-    View vCancel;
+
+    ViewHeaderHolder mHeaderHolder;
+    CitySelectAdapter mAdapter;
+    CitySelectSearchAdapter mSearchAdapter;
     @BindView(R.id.v_search)
     View vSearch;
     @BindView(R.id.et_search)
     EditText etSearch;
-    @BindView(R.id.tv_search)
-    TextView tvSearch;
     @BindView(R.id.ll_search)
     LinearLayout llSearch;
+    @BindView(R.id.tv_cancel)
+    TextView tvCancel;
     @BindView(R.id.lv_city)
     StickyListHeadersListView lvCity;
     @BindView(R.id.siv_list)
@@ -50,10 +52,6 @@ public class CitySelectActivity extends BaseActivity<CitySelectPresenter> implem
     @BindView(R.id.rv_search)
     RecyclerView rvSearch;
 
-    ViewHeaderHolder mHeaderHolder;
-    CitySelectAdapter mAdapter;
-    CitySelectSearchAdapter mSearchAdapter;
-
     @Override
     public int getLayoutId() {
         return R.layout.activity_city_select;
@@ -120,10 +118,10 @@ public class CitySelectActivity extends BaseActivity<CitySelectPresenter> implem
         mHeaderHolder.setCityName(cityName);
     }
 
-    @OnClick(R.id.v_cancel)
+    @OnClick(R.id.tv_cancel)
     public void onClick(View view) {
         switch (view.getId()) {
-            case R.id.v_cancel:
+            case R.id.tv_cancel:
                 finish();
                 break;
         }

+ 5 - 9
app/src/main/java/com/tongyu/luck/happywork/ui/activity/cclient/job/SearchJobActivity.java

@@ -36,15 +36,14 @@ import butterknife.OnTextChanged;
 
 public class SearchJobActivity extends BaseActivity<SearchPresenter> implements SearchJobContacts.ISearchJobView {
 
-
-    @BindView(R.id.v_cancel)
-    View vCancel;
     @BindView(R.id.v_search)
     View vSearch;
     @BindView(R.id.et_search)
     EditText etSearch;
     @BindView(R.id.ll_search)
     LinearLayout llSearch;
+    @BindView(R.id.tv_cancel)
+    TextView tvCancel;
     @BindView(R.id.v_clear)
     View vClear;
     @BindView(R.id.lv_history)
@@ -59,8 +58,7 @@ public class SearchJobActivity extends BaseActivity<SearchPresenter> implements
     ProgressRefreshLayout prlRefresh;
     @BindView(R.id.ll_list)
     LinearLayout llList;
-    @BindView(R.id.tv_search)
-    TextView tvSearch;
+
     private FooterViewHolder mFooterHolder;
     private JobListAdapter mAdapter;
     private ClearDialog mClearDialog;
@@ -88,9 +86,9 @@ public class SearchJobActivity extends BaseActivity<SearchPresenter> implements
         return false;
     }
 
-    @OnClick({R.id.v_cancel, R.id.v_clear, R.id.tv_search})
+    @OnClick({R.id.tv_cancel, R.id.v_clear})
     public void onClick(View view) {
-        if (view.getId() == R.id.v_cancel) {
+        if (view.getId() == R.id.tv_cancel) {
             finish();
         } else if (view.getId() == R.id.v_clear) {
             if (mClearDialog == null) {
@@ -99,8 +97,6 @@ public class SearchJobActivity extends BaseActivity<SearchPresenter> implements
                 mClearDialog.setOnClickSureListener(onClickSureListener);
             }
             mClearDialog.show();
-        } else if (view.getId() == R.id.tv_search) {
-            mvpPresenter.getHttpBasePositionList(true, etSearch.getText().toString(), true);
         }
     }
 

+ 8 - 0
app/src/main/res/drawable/corners_stork_blue_0070_5dp.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <!--圆角半径-->
+    <corners android:radius="5dp" />
+    <stroke
+        android:width="1dp"
+        android:color="@color/blue_0070" />
+</shape>

+ 18 - 27
app/src/main/res/layout/activity_city_select.xml

@@ -7,28 +7,18 @@
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="@dimen/title_height"
+        android:layout_height="50dp"
         android:background="@color/white"
         android:gravity="center_vertical"
         android:orientation="horizontal">
 
-
-        <View
-            android:id="@+id/v_cancel"
-            android:layout_width="10dp"
-            android:layout_height="18dp"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="14dp"
-            android:background="@mipmap/ic_blue_left" />
-
-
         <LinearLayout
             android:id="@+id/ll_search"
             android:layout_width="0dp"
-            android:layout_height="36dp"
-            android:layout_marginRight="20dp"
+            android:layout_height="31dp"
+            android:layout_marginLeft="14dp"
             android:layout_weight="1"
-            android:background="@drawable/corners_stroke_blue_01_18dp"
+            android:background="@drawable/corners_stork_blue_0070_5dp"
             android:gravity="center_vertical"
             android:orientation="horizontal">
 
@@ -36,7 +26,7 @@
                 android:id="@+id/v_search"
                 android:layout_width="14dp"
                 android:layout_height="14dp"
-                android:layout_marginLeft="12dp"
+                android:layout_marginLeft="10dp"
                 android:layout_marginRight="5dp"
                 android:background="@mipmap/ic_search_gray" />
 
@@ -48,23 +38,24 @@
                 android:layout_weight="1"
                 android:background="@null"
                 android:gravity="center_vertical"
-                android:hint="@string/home_city_select_title"
+                android:hint="@string/home_search_title"
                 android:imeOptions="actionSearch"
                 android:singleLine="true"
                 android:textColor="@color/text_black"
-                android:textColorHint="@color/text_gray_aa"
-                android:textSize="@dimen/px39_13sp" />
+                android:textColorHint="@color/text_gray_cc"
+                android:textSize="@dimen/px36_12sp" />
 
-            <TextView
-                android:id="@+id/tv_search"
-                android:layout_width="61dp"
-                android:layout_height="match_parent"
-                android:background="@drawable/corners_blue_01_18dp"
-                android:gravity="center"
-                android:text="@string/search"
-                android:textColor="@color/white"
-                android:textSize="@dimen/px39_13sp" />
         </LinearLayout>
+
+        <TextView
+            android:id="@+id/tv_cancel"
+            android:layout_width="60dp"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:text="@string/cancel"
+            android:textColor="@color/text_black_44"
+            android:textSize="@dimen/px45_15sp" />
+
     </LinearLayout>
 
     <RelativeLayout

+ 18 - 26
app/src/main/res/layout/activity_search.xml

@@ -8,28 +8,18 @@
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="@dimen/title_height"
+        android:layout_height="50dp"
         android:background="@color/white"
         android:gravity="center_vertical"
         android:orientation="horizontal">
 
-
-        <View
-            android:id="@+id/v_cancel"
-            android:layout_width="10dp"
-            android:layout_height="18dp"
-            android:layout_marginLeft="20dp"
-            android:layout_marginRight="14dp"
-            android:background="@mipmap/ic_blue_left" />
-
-
         <LinearLayout
             android:id="@+id/ll_search"
             android:layout_width="0dp"
-            android:layout_height="36dp"
-            android:layout_marginRight="20dp"
+            android:layout_height="31dp"
+            android:layout_marginLeft="14dp"
             android:layout_weight="1"
-            android:background="@drawable/corners_stroke_blue_01_18dp"
+            android:background="@drawable/corners_stork_blue_0070_5dp"
             android:gravity="center_vertical"
             android:orientation="horizontal">
 
@@ -37,7 +27,7 @@
                 android:id="@+id/v_search"
                 android:layout_width="14dp"
                 android:layout_height="14dp"
-                android:layout_marginLeft="12dp"
+                android:layout_marginLeft="10dp"
                 android:layout_marginRight="5dp"
                 android:background="@mipmap/ic_search_gray" />
 
@@ -53,19 +43,21 @@
                 android:imeOptions="actionSearch"
                 android:singleLine="true"
                 android:textColor="@color/text_black"
-                android:textColorHint="@color/text_gray_aa"
-                android:textSize="@dimen/px39_13sp" />
+                android:textColorHint="@color/text_gray_cc"
+                android:textSize="@dimen/px36_12sp" />
+
 
-            <TextView
-                android:id="@+id/tv_search"
-                android:layout_width="61dp"
-                android:layout_height="match_parent"
-                android:background="@drawable/corners_blue_01_18dp"
-                android:gravity="center"
-                android:text="@string/search"
-                android:textColor="@color/white"
-                android:textSize="@dimen/px39_13sp" />
         </LinearLayout>
+
+        <TextView
+            android:id="@+id/tv_cancel"
+            android:layout_width="60dp"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:text="@string/cancel"
+            android:textColor="@color/text_black_44"
+            android:textSize="@dimen/px45_15sp" />
+
     </LinearLayout>
 
 

+ 1 - 0
app/src/main/res/values/colors.xml

@@ -78,6 +78,7 @@
     <color name="blue_main">#4183E1</color>
     <color name="blue_01">#0177FF</color>
     <color name="blue_00">#007AFF</color>
+    <color name="blue_0070">#0070F2</color>
     <color name="blue_integral_bg">#E8F2FF</color>
     <color name="date_picker_color">#1684D7</color>
     <color name="time_picker_out">#BEE4FC</color>