Prechádzať zdrojové kódy

1.优化报名列表 已下架不被挤出
2.订单生成后提示订单已生成

wsad5123 5 rokov pred
rodič
commit
d2d0c98709

+ 7 - 7
app/src/main/java/com/webrain/happywork/ui/adapter/listview/MineApplyListAdapter.java

@@ -63,12 +63,12 @@ public class MineApplyListAdapter extends BaseListAdapter<EnrollmentBean, MineAp
         Drawable d_going;
         @BindDrawable(R.mipmap.ic_demand_success)
         Drawable d_success;
+        @BindDrawable(R.mipmap.ic_demand_down)
+        Drawable d_down;
         @BindView(R.id.tv_stage)
         TextView tvStage;
         @BindView(R.id.tv_cancel)
         TextView tvCancel;
-        @BindView(R.id.tv_down)
-        TextView tvDown;
         EnrollmentBean bean;
 
         public MineApplyViewHolder(Context mContext) {
@@ -92,11 +92,11 @@ public class MineApplyListAdapter extends BaseListAdapter<EnrollmentBean, MineAp
                 tvAddress.setText(obj.getHwRequirement() != null && TextUtils.isEmpty(obj.getHwRequirement().getProvinceCityCountry()) ? "" : obj.getHwRequirement().getProvinceCityCountry());
 
                 if (obj.getHwRequirement() != null && obj.getHwRequirement().getIsOn() == 0) {
-                    tvDown.setVisibility(View.VISIBLE);
+                    tvTitle.setCompoundDrawablesWithIntrinsicBounds(null, null, d_down, null);
                     tvPrice.setTextColor(mContext.getResources().getColor(R.color.text_black));
                     tvStage.setTextColor(mContext.getResources().getColor(R.color.text_black));
-                }else{
-                    tvDown.setVisibility(View.GONE);
+                } else {
+                    tvTitle.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null);
                     tvPrice.setTextColor(mContext.getResources().getColor(R.color.text_blue_32));
                     tvStage.setTextColor(mContext.getResources().getColor(R.color.text_blue_32));
                 }
@@ -123,8 +123,8 @@ public class MineApplyListAdapter extends BaseListAdapter<EnrollmentBean, MineAp
         }
 
         @OnClick(R.id.tv_cancel)
-        public void onClick(View view){
-            ((MineApplyListActivity)mContext).mvpPresenter.requestCancelApply(bean);
+        public void onClick(View view) {
+            ((MineApplyListActivity) mContext).mvpPresenter.requestCancelApply(bean);
         }
     }
 }

+ 20 - 23
app/src/main/res/layout/item_list_mine_apply.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout 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:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
@@ -13,19 +15,19 @@
         android:paddingLeft="15dp"
         android:paddingRight="20dp">
 
-        <LinearLayout
+        <android.support.constraint.ConstraintLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="19dp"
-            android:gravity="bottom"
-            android:orientation="horizontal">
+            android:layout_marginTop="19dp">
 
-            <LinearLayout
+            <android.support.constraint.ConstraintLayout
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:gravity="center_vertical"
-                android:orientation="horizontal">
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toStartOf="@id/tv_price"
+                app:layout_constraintHorizontal_weight="1"
+                app:layout_constraintStart_toStartOf="parent"
+                tools:ignore="MissingConstraints">
 
                 <TextView
                     android:id="@+id/tv_title"
@@ -36,17 +38,7 @@
                     android:textColor="@color/text_black"
                     android:textSize="@dimen/px48_16sp" />
 
-                <TextView
-                    android:id="@+id/tv_down"
-                    android:layout_width="48dp"
-                    android:layout_height="16dp"
-                    android:layout_marginLeft="3dp"
-                    android:background="@drawable/corners_gray_88_5dp"
-                    android:gravity="center"
-                    android:text="@string/demand_order_over"
-                    android:textColor="@color/white"
-                    android:textSize="@dimen/px33_11sp" />
-            </LinearLayout>
+            </android.support.constraint.ConstraintLayout>
 
 
             <TextView
@@ -55,7 +47,10 @@
                 android:layout_height="wrap_content"
                 android:text="2500元"
                 android:textColor="@color/text_blue_32"
-                android:textSize="@dimen/px48_16sp" />
+                android:textSize="@dimen/px48_16sp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toStartOf="@+id/tv_stage"
+                tools:ignore="MissingConstraints" />
 
             <TextView
                 android:id="@+id/tv_stage"
@@ -63,10 +58,12 @@
                 android:layout_height="wrap_content"
                 android:text="*24月"
                 android:textColor="@color/text_blue_32"
-                android:textSize="@dimen/px36_12sp" />
-
-        </LinearLayout>
+                android:textSize="@dimen/px36_12sp"
+                app:layout_constraintBottom_toBottomOf="parent"
+                app:layout_constraintEnd_toEndOf="parent"
+                tools:ignore="MissingConstraints" />
 
+        </android.support.constraint.ConstraintLayout>
 
         <TextView
             android:id="@+id/tv_company"

BIN
app/src/main/res/mipmap-hdpi/ic_demand_down.png


BIN
app/src/main/res/mipmap-xhdpi/ic_demand_down.png


BIN
app/src/main/res/mipmap-xxhdpi/ic_demand_down.png


BIN
app/src/main/res/mipmap-xxxhdpi/ic_demand_down.png


+ 1 - 1
app/src/main/res/values/strings.xml

@@ -98,7 +98,7 @@
     <string name="mine_authentication_none">未认证</string>
     <string name="mine_authentication_success">已认证</string>
     <string name="mine_authentication_failed">未通过</string>
-    <string name="mine_has_apply">已报名</string>
+    <string name="mine_has_apply">订单已生成</string>
 
     <string name="hint_input_phone">请输入手机号码</string>
     <string name="hint_input_code">请输入短信验证码</string>