Browse Source

添加充值vip功能,修改vip相关界面

zengjiebin 7 years ago
parent
commit
45b08cee24

+ 43 - 4
app/src/main/java/com/sheep/gamegroup/module/user/activity/ActVip.java

@@ -4,18 +4,22 @@ import android.content.Context;
 import android.support.v4.content.ContextCompat;
 import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
 import android.view.View;
-import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.user.model.BuyVipReq;
+import com.sheep.gamegroup.module.user.model.TempUserResp;
 import com.sheep.gamegroup.util.ApiJSONUtil;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -24,6 +28,7 @@ import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 
 import butterknife.BindView;
 
@@ -49,12 +54,12 @@ public class ActVip extends BaseActivity {
                 .setTitleFinish(this)
                 .setTitle(this, "VIP");
         list.add(new BuyVipReq().setPay_name("支付宝").setPay_type(BuyVipReq.PAY_TYPE_ALIPAY));
-        list.add(new BuyVipReq().setPay_name("微信").setPay_type(BuyVipReq.PAY_TYPE_WX));
+//        list.add(new BuyVipReq().setPay_name("微信").setPay_type(BuyVipReq.PAY_TYPE_WX));
     }
 
     @Override
     public void initListener() {
-        recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), 2));
+        recyclerView.setLayoutManager(new GridLayoutManager(getApplicationContext(), list.size()));
         BaseQuickAdapter<BuyVipReq, BaseViewHolder> adapter = new BaseQuickAdapter<BuyVipReq, BaseViewHolder>(R.layout.rechargeprice_gridview_item, list) {
             @Override
             protected void convert(BaseViewHolder helper, BuyVipReq item) {
@@ -96,7 +101,41 @@ public class ActVip extends BaseActivity {
 
                         @Override
                         public void onNext(BaseMessage baseMessage) {
-                            G.showToast(baseMessage);
+                            TempUserResp result = baseMessage.getData(TempUserResp.class);
+                            if(result != null && !TextUtils.isEmpty(result.getPay_url())) {
+                                switch (item.getPay_type()){
+                                    case BuyVipReq.PAY_TYPE_ALIPAY:
+                                        CommonUtil.getInstance().alipay(ActVip.this, result.getPay_url(), true, new AbsObserver<String>() {
+                                            @Override
+                                            public void onNext(String result) {
+                                                switch (result){
+                                                    case "9000":
+                                                        G.showToast(R.string.pay_success);
+                                                        break;
+                                                    case "6001":
+                                                        G.showToast(R.string.you_had_cancel_pay);
+                                                        break;
+                                                    default:
+                                                        G.showToast(R.string.pay_fail);
+                                                        break;
+                                                }
+                                                LogUtil.println(ActVip.class.getSimpleName(), String.format(Locale.CHINA, "alipay onNext('%s')", result));
+                                            }
+
+                                            @Override
+                                            public void onError(Throwable e) {
+                                                G.showToast(e);
+                                                LogUtil.println(ActVip.class.getSimpleName(), String.format(Locale.CHINA, "alipay onError('%s')", e.getMessage()));
+                                            }
+                                        });
+                                        break;
+                                    case BuyVipReq.PAY_TYPE_WX:
+                                        G.showToast(R.string.coming_soon);
+                                        break;
+                                }
+                            } else {
+                                G.showToast(R.string.please_contact_customer_service);
+                            }
                         }
                     });
         }

+ 6 - 6
app/src/main/java/com/sheep/gamegroup/module/user/model/TempUserResp.java

@@ -5,16 +5,16 @@ package com.sheep.gamegroup.module.user.model;
  * realicing@sina.com
  * 用户充值vip结果
  *
- * token:	string 临时用户token
+ * pay_url:	string payinfo
  */
 public class TempUserResp {
-    private String token;// 临时用户token
+    private String pay_url;
 
-    public String getToken() {
-        return token;
+    public String getPay_url() {
+        return pay_url;
     }
 
-    public void setToken(String token) {
-        this.token = token;
+    public void setPay_url(String pay_url) {
+        this.pay_url = pay_url;
     }
 }

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java

@@ -201,12 +201,12 @@ public class KFZSJs {
         CommonUtil.getInstance().alipay(activity, payInfo, b, new AbsObserver<String>() {
             @Override
             public void onNext(String result) {
-                activity.loadJs(String.format(Locale.CHINA, "onAlipayResult('%s')", result));
+                activity.loadJs(String.format(Locale.CHINA, "alipay onNext('%s')", result));
             }
 
             @Override
             public void onError(Throwable e) {
-                activity.loadJs(String.format(Locale.CHINA, "onAlipayResult('%s')", e.getMessage()));
+                activity.loadJs(String.format(Locale.CHINA, "alipay onError('%s')", e.getMessage()));
             }
         });
     }

+ 17 - 2
app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java

@@ -40,6 +40,7 @@ import com.sheep.gamegroup.model.entity.TaskChild;
 import com.sheep.gamegroup.model.entity.TaskDescEntity;
 import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.entity.Release_task;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.EntityUtils;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.presenter.TaskDetailContract;
@@ -132,6 +133,8 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
     TextView dateTv;
     @BindView(R.id.price_tv)
     TextView priceTv;
+    @BindView(R.id.item_money_vip_tv)
+    TextView item_money_vip_tv;
     @BindView(R.id.detail_task_tv)
     TextView detailTaskTv;
     @BindView(R.id.web_text)
@@ -149,7 +152,9 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
     @BindView(R.id.empty_view)
     View empty_view;
     @BindView(R.id.detail_shrae_friend_layout)
-    LinearLayout detail_shrae_friend_layout;
+    View detail_shrae_friend_layout;
+    @BindView(R.id.task_detail_pay_vip_tv)
+    View task_detail_pay_vip_tv;
     @BindView(R.id.detail_item_layout_2)
     LinearLayout detail_item_layout_2;
     @BindView(R.id.detail_item_layout_3)
@@ -252,11 +257,13 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
         ViewUtil.setVisibility(bottom_btn_layout, false);
         ViewUtil.setDefaultText(nameTv);
         ViewUtil.setDefaultText(priceTv);
+        ViewUtil.setDefaultText(item_money_vip_tv);
         ViewUtil.setDefaultText(dateTv);
         ViewUtil.setDefaultText(num_tv);
         if (DataUtil.IS_LISTEN_SCREEN_SHOT) {//监听小绵羊截图功能需要开启查看应用使用情况的权限
             AppUsageManager.getInstance().tryOpenLookAppUsageStatsPermission(false);
         }
+        CommonUtil.getInstance().callActionWithUserInfo(userEntity -> ViewUtil.setVisibility(task_detail_pay_vip_tv, userEntity == null || !userEntity.isVIP()));
     }
 
     @Override
@@ -294,6 +301,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
         }
         ViewUtil.setText(nameTv, taskReleaseEty.getName());
         ViewUtil.setText(priceTv, String.format(Locale.CHINA, "+%s元", taskReleaseEty.getBonusText()));
+        ViewUtil.setText(item_money_vip_tv, taskReleaseEty.getVipBonusText());
         if (!taskReleaseEty.getDeadline().equals("永久")) {
             ViewUtil.setText(dateTv, String.format(Locale.CHINA, "截至日期:%s", TimeUtil.getDate(TimeUtil.FORMAT, Long.valueOf(taskReleaseEty.getDeadline()))));
         } else {
@@ -837,7 +845,8 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
      */
     private DownloadUtil downloadUtil;
 
-    @OnClick({R.id.detail_task_tv, R.id.web_text, R.id.ll_infos, R.id.btn_task_item, R.id.btn_up_imag, R.id.detail_share_friend_tv, R.id.task_detail_cancel})
+    @OnClick({R.id.detail_task_tv, R.id.web_text, R.id.ll_infos, R.id.btn_task_item, R.id.btn_up_imag, R.id.detail_share_friend_tv, R.id.task_detail_cancel,
+            R.id.task_detail_pay_vip_tv, R.id.task_detail_vip_cl})
     public void onViewClicked(View view) {
         try {
             switch (view.getId()) {
@@ -875,6 +884,12 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
                             }
                         });
                     break;
+                case R.id.task_detail_vip_cl:
+                    Jump2View.getInstance().goActVip(this);
+                    break;
+                case R.id.task_detail_pay_vip_tv:
+                    Jump2View.getInstance().goActVip(this);
+                    break;
             }
         } catch (Exception e) {
             e.printStackTrace();

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAddQQAct.java

@@ -62,7 +62,7 @@ public class TaskDetailAddQQAct extends AbsChooseImageActivity {
     @BindView(R.id.detail_item_layout_3)
     LinearLayout detail_item_layout_3;
     @BindView(R.id.detail_shrae_friend_layout)
-    LinearLayout detail_shrae_friend_layout;
+    View detail_shrae_friend_layout;
     @BindView(R.id.item_layout)
     View item_layout;
     private Activity activity;

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailCreditCardAct.java

@@ -75,7 +75,7 @@ public class TaskDetailCreditCardAct extends AbsChooseImageActivity {
     @BindView(R.id.detail_item_layout_3)
     LinearLayout detail_item_layout_3;
     @BindView(R.id.detail_shrae_friend_layout)
-    LinearLayout detail_shrae_friend_layout;
+    View detail_shrae_friend_layout;
     @BindView(R.id.detail_task_listview)
     MyListview detail_task_listview;
     @BindView(R.id.item_layout)

+ 8 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/utils/G.java

@@ -16,6 +16,7 @@ import android.widget.Toast;
 
 import com.kfzs.duanduan.view.DialogStorageLow;
 import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -106,6 +107,13 @@ public class G {
             G.showToast(baseMessage.getMsg() + (BuildConfig.DEBUG ? "[" + baseMessage.getCode() + "]" : ""));
         }
     }
+    public static void showToast(Throwable throwable) {
+        if(throwable != null && !TextUtils.isEmpty(throwable.getMessage())){
+            G.showToast(throwable.getMessage());
+        } else {
+            G.showToast(R.string.unknown_error);
+        }
+    }
     /**
      * 通过反射,获取包含虚拟键的整体屏幕高度
      *

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

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners
+        android:radius="8dp" />
+    <solid android:color="#E6C38F" />
+
+</shape>

+ 212 - 111
app/src/main/res/layout/task_detail_layout.xml

@@ -1,8 +1,8 @@
 <?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"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:fitsSystemWindows="true"
     android:orientation="vertical">
 
@@ -11,17 +11,20 @@
         layout="@layout/empty_view"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:visibility="gone"/>
+        android:visibility="gone" />
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/white"
         android:orientation="vertical">
+
         <android.support.v4.widget.NestedScrollView
             android:layout_width="match_parent"
             android:layout_height="0dp"
             android:layout_weight="1"
             android:scrollbars="none">
+
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
@@ -33,92 +36,102 @@
                     android:id="@+id/ems_game_layout"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/content_padding_10"
                     android:layout_marginLeft="@dimen/content_padding_10"
+                    android:layout_marginTop="@dimen/content_padding_10"
                     android:layout_marginRight="@dimen/content_padding_10"
                     android:visibility="gone">
+
                     <TextView
                         android:id="@+id/ems_left_tv"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:text="平台·用户须知"
-                        android:gravity="center"
-                        android:ems="2"
-                        android:textColor="#D3AF57"
+                        android:layout_centerVertical="true"
+                        android:layout_marginRight="@dimen/common_margin_10"
+                        android:layout_marginBottom="@dimen/content_padding_20"
                         android:background="@drawable/sp_bg_black_radius"
-                        android:paddingTop="@dimen/content_padding_10"
-                        android:paddingBottom="@dimen/content_padding_10"
+                        android:ems="2"
+                        android:gravity="center"
                         android:paddingLeft="@dimen/content_padding_8"
+                        android:paddingTop="@dimen/content_padding_10"
                         android:paddingRight="@dimen/content_padding_8"
-                        android:layout_marginRight="@dimen/common_margin_10"
-                        android:layout_marginBottom="@dimen/content_padding_20"
-                        android:layout_centerVertical="true"/>
+                        android:paddingBottom="@dimen/content_padding_10"
+                        android:text="平台·用户须知"
+                        android:textColor="#D3AF57" />
+
                     <LinearLayout
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:orientation="vertical"
+                        android:layout_centerVertical="true"
                         android:layout_toRightOf="@+id/ems_left_tv"
-                        android:layout_centerVertical="true">
+                        android:orientation="vertical">
+
                         <TextView
                             android:id="@+id/user_know_one_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/user_know_one"
-                            android:layout_toRightOf="@+id/ems_left_tv"/>
+                            android:layout_toRightOf="@+id/ems_left_tv"
+                            android:text="@string/user_know_one" />
+
                         <TextView
                             android:id="@+id/user_know_two_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/user_know_two"
                             android:layout_below="@+id/user_know_one_tv"
+                            android:layout_marginTop="@dimen/content_padding_5"
                             android:layout_toRightOf="@+id/ems_left_tv"
-                            android:layout_marginTop="@dimen/content_padding_5"/>
+                            android:text="@string/user_know_two" />
+
                         <TextView
                             android:id="@+id/user_know_three_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/user_know_three"
                             android:layout_below="@+id/user_know_two_tv"
+                            android:layout_marginTop="@dimen/content_padding_5"
                             android:layout_toRightOf="@+id/ems_left_tv"
-                            android:layout_marginTop="@dimen/content_padding_5"/>
+                            android:text="@string/user_know_three" />
+
                         <TextView
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/user_know_four"
                             android:layout_below="@+id/user_know_three_tv"
+                            android:layout_marginTop="@dimen/content_padding_5"
                             android:layout_toRightOf="@+id/ems_left_tv"
-                            android:layout_marginTop="@dimen/content_padding_5"/>
+                            android:text="@string/user_know_four" />
                     </LinearLayout>
 
                 </RelativeLayout>
+
                 <RelativeLayout
                     android:id="@+id/detail_item_layout_1"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/content_padding_10"
                     android:layout_marginLeft="@dimen/content_padding_10"
+                    android:layout_marginTop="@dimen/content_padding_10"
                     android:layout_marginRight="@dimen/content_padding_10"
                     android:layout_marginBottom="@dimen/content_padding_10">
+
                     <android.support.constraint.ConstraintLayout
                         android:id="@+id/item_layout"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
                         android:padding="@dimen/content_padding_10">
+
                         <ImageView
                             android:id="@+id/icon_iv"
                             android:layout_width="70dp"
                             android:layout_height="70dp"
                             android:src="@drawable/icon_lj"
                             app:layout_constraintStart_toStartOf="parent"
-                            app:layout_constraintTop_toTopOf="parent"/>
+                            app:layout_constraintTop_toTopOf="parent" />
+
                         <TextView
                             android:id="@+id/end_of_time_tv"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
                             android:layout_marginStart="@dimen/content_padding_4"
-                            android:layout_marginEnd="@dimen/content_padding_4"
                             android:layout_marginTop="55dp"
+                            android:layout_marginEnd="@dimen/content_padding_4"
                             android:background="@drawable/shape_ash_stroke_white_solid_rectangle"
                             android:gravity="center"
                             android:lines="1"
@@ -127,30 +140,31 @@
                             android:visibility="gone"
                             app:layout_constraintEnd_toEndOf="@+id/icon_iv"
                             app:layout_constraintStart_toStartOf="@+id/icon_iv"
-                            app:layout_constraintTop_toTopOf="parent"/>
+                            app:layout_constraintTop_toTopOf="parent" />
 
                         <LinearLayout
                             android:id="@+id/name_date_layout"
                             android:layout_width="0dp"
                             android:layout_height="70dp"
-                            android:orientation="vertical"
                             android:layout_marginStart="@dimen/content_padding"
+                            android:orientation="vertical"
                             app:layout_constraintEnd_toStartOf="@+id/price_layout"
-                            app:layout_constraintStart_toEndOf="@+id/icon_iv"
-                            >
+                            app:layout_constraintStart_toEndOf="@+id/icon_iv">
+
                             <TextView
                                 android:id="@+id/name_tv"
-                                android:textSize="@dimen/text_size_15"
-                                android:textColor="@color/black_444444"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:maxLines="2"
                                 android:ellipsize="middle"
-                                android:text=""/>
+                                android:maxLines="2"
+                                android:text=""
+                                android:textColor="@color/black_444444"
+                                android:textSize="@dimen/text_size_15" />
+
                             <View
                                 android:layout_width="match_parent"
                                 android:layout_height="0dp"
-                                android:layout_weight="3"/>
+                                android:layout_weight="3" />
 
 
                             <LinearLayout
@@ -164,8 +178,9 @@
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
                                     android:text=""
-                                    android:textSize="@dimen/text_size_2"
-                                    android:textColor="@color/txt_black_818181"/>
+                                    android:textColor="@color/txt_black_818181"
+                                    android:textSize="@dimen/text_size_2" />
+
                                 <TextView
                                     android:id="@+id/num_tv1"
                                     android:layout_width="wrap_content"
@@ -176,17 +191,19 @@
                                     android:textSize="@dimen/text_size_2"
                                     android:visibility="gone" />
                             </LinearLayout>
+
                             <View
                                 android:layout_width="match_parent"
                                 android:layout_height="0dp"
-                                android:layout_weight="1"/>
+                                android:layout_weight="1" />
+
                             <TextView
                                 android:id="@+id/date_tv"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
                                 android:text="111"
-                                android:textSize="@dimen/text_size_2"
-                                android:textColor="@color/txt_black_818181"/>
+                                android:textColor="@color/txt_black_818181"
+                                android:textSize="@dimen/text_size_2" />
                         </LinearLayout>
 
                         <LinearLayout
@@ -195,152 +212,239 @@
                             android:layout_height="wrap_content"
                             android:layout_centerVertical="true"
                             android:layout_marginStart="@dimen/content_padding_5"
-                            app:layout_constraintStart_toEndOf="@+id/name_date_layout"
-                            app:layout_constraintEnd_toEndOf="parent"
-                            app:layout_constraintTop_toTopOf="@+id/icon_iv"
-                            app:layout_constraintBottom_toBottomOf="@+id/icon_iv"
                             android:gravity="right"
-                            android:orientation="vertical">
+                            android:orientation="vertical"
+                            app:layout_constraintBottom_toBottomOf="@+id/icon_iv"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintStart_toEndOf="@+id/name_date_layout"
+                            app:layout_constraintTop_toTopOf="@+id/icon_iv">
+
                             <TextView
                                 android:id="@+id/price_tv"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text=""
+                                android:layout_gravity="center_horizontal"
+                                android:text="+1.5元"
                                 android:textColor="@color/txt_red"
-                                android:textSize="@dimen/text_size_20"
-                                android:layout_gravity="center_horizontal"/>
+                                android:textSize="18sp" />
+
+                            <TextView
+                                android:id="@+id/item_money_vip_tv"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginTop="5dp"
+                                android:layout_marginBottom="5dp"
+                                android:gravity="center"
+                                android:minWidth="@dimen/find_bt_with"
+                                android:text="会员:+11元"
+                                android:textColor="#C3995E"
+                                android:textSize="10sp" />
+
                             <TextView
                                 android:id="@+id/task_detail_reward"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text="@string/task_benefit_limit"
-                                android:textSize="@dimen/text_size_2"
                                 android:layout_gravity="center_horizontal"
-                                android:textColor="@color/txt_black_818181"/>
+                                android:text="@string/task_benefit_limit"
+                                android:textColor="@color/txt_black_818181"
+                                android:textSize="@dimen/text_size_2" />
+
                             <TextView
                                 android:id="@+id/task_detail_cancel"
                                 style="@style/style_button_find"
                                 android:text="@string/task_cancel"
                                 android:textSize="@dimen/text_size_2"
-                                android:visibility="gone"/>
+                                android:visibility="gone" />
+
                             <TextView
                                 android:id="@+id/detail_task_tv"
                                 android:layout_width="wrap_content"
                                 android:layout_height="wrap_content"
-                                android:text="@string/task_screenshot"
+                                android:layout_alignParentRight="true"
+                                android:layout_alignParentBottom="true"
+                                android:layout_marginTop="@dimen/content_padding_8"
+                                android:background="@drawable/sp_bg_gradient_rectangle_yellow"
+                                android:gravity="center"
                                 android:minWidth="@dimen/view_size_73"
+                                android:padding="@dimen/content_padding_3"
+                                android:text="@string/task_screenshot"
                                 android:textColor="@color/white"
                                 android:textSize="@dimen/text_size_12"
-                                android:gravity="center"
-                                android:padding="@dimen/content_padding_3"
-                                android:layout_alignParentRight="true"
-                                android:background="@drawable/sp_bg_gradient_rectangle_yellow"
-                                android:visibility="gone"
-                                android:layout_marginTop="@dimen/content_padding_8"
-                                android:layout_alignParentBottom="true"/>
+                                android:visibility="gone" />
                         </LinearLayout>
 
                     </android.support.constraint.ConstraintLayout>
-                    <LinearLayout
+
+                    <android.support.constraint.ConstraintLayout
                         android:id="@+id/detail_shrae_friend_layout"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:orientation="horizontal"
                         android:layout_below="@+id/item_layout"
-                        android:padding="@dimen/content_padding_10"
-                        android:background="@drawable/sp_bg_blue_solid_gray"
-                        android:visibility="gone">
-                        <TextView
-                            android:layout_width="0dp"
-                            android:layout_height="wrap_content"
-                            android:layout_weight="1"
-                            android:text="@string/tip_invite_for_more_coin_20_percent"
-                            style="@style/nomal_txt_style_13"
-                            android:layout_gravity="center_vertical"
-                            android:gravity="center_vertical"
-                            android:paddingRight="@dimen/content_padding_small"/>
+                        android:background="@color/blue_E2F4FE"
+                        android:orientation="horizontal">
+
                         <TextView
                             android:id="@+id/detail_share_friend_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
+                            android:layout_gravity="center_vertical"
+                            android:layout_marginTop="16dp"
+                            android:layout_marginEnd="10dp"
+                            android:background="@drawable/sp_appointment_bg"
+                            android:paddingStart="10dp"
+                            android:paddingTop="5dp"
+                            android:paddingEnd="10dp"
+                            android:paddingBottom="5dp"
                             android:text="发送给好友"
-                            android:textColor="@color/blue_34a6e7"
-                            android:textSize="@dimen/text_size_13"
+                            android:textColor="#34A7E8"
+                            android:textSize="11sp"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                        <TextView
+                            style="@style/nomal_txt_style_13"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
                             android:layout_gravity="center_vertical"
-                            android:paddingLeft="@dimen/common_margin_10"
-                            android:paddingRight="@dimen/common_margin_10"
-                            android:paddingBottom="@dimen/tag_vertical_spacing"
-                            android:paddingTop="@dimen/tag_vertical_spacing"
-                            android:background="@drawable/sp_appointment_bg"/>
-                    </LinearLayout>
+                            android:layout_marginEnd="6dp"
+                            android:gravity="center_vertical"
+                            android:padding="6dp"
+                            android:text="@string/tip_invite_for_more_coin_20_percent"
+                            app:layout_constraintBottom_toBottomOf="@id/detail_share_friend_tv"
+                            app:layout_constraintEnd_toStartOf="@id/detail_share_friend_tv"
+                            app:layout_constraintTop_toTopOf="@id/detail_share_friend_tv" />
+
+                        <android.support.constraint.ConstraintLayout
+                            android:id="@+id/task_detail_vip_cl"
+                            android:layout_width="match_parent"
+                            android:layout_height="34dp"
+                            android:layout_marginStart="9dp"
+                            android:layout_marginTop="20dp"
+                            android:layout_marginEnd="9dp"
+                            android:background="@drawable/shape_black_solid_rectangle_top_6"
+                            app:layout_constraintEnd_toEndOf="parent"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintTop_toBottomOf="@id/detail_share_friend_tv">
+
+                            <ImageView
+                                android:layout_width="16dp"
+                                android:layout_height="wrap_content"
+                                android:layout_marginStart="7dp"
+                                android:adjustViewBounds="true"
+                                android:scaleType="fitXY"
+                                android:src="@mipmap/ic_vip_1"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginStart="26dp"
+                                android:text="尊享会员"
+                                android:textColor="#ffe6c38f"
+                                android:textSize="10sp"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintStart_toStartOf="parent"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+                            <TextView
+                                android:id="@+id/task_detail_pay_vip_tv"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginEnd="6dp"
+                                android:background="@drawable/shape_e6c38f_solid_rectangle_8"
+                                android:paddingStart="7dp"
+                                android:paddingTop="3dp"
+                                android:paddingEnd="7dp"
+                                android:paddingBottom="3dp"
+                                android:text="直接购买"
+                                android:textColor="#ff000000"
+                                android:textSize="10sp"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toEndOf="parent"
+                                app:layout_constraintTop_toTopOf="parent" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_marginEnd="8dp"
+                                android:text="@string/task_detail_vip_tip"
+                                android:textColor="#ffe6c38f"
+                                android:textSize="10sp"
+                                app:layout_constraintBottom_toBottomOf="parent"
+                                app:layout_constraintEnd_toStartOf="@id/task_detail_pay_vip_tv"
+                                app:layout_constraintTop_toTopOf="parent" />
+                        </android.support.constraint.ConstraintLayout>
+                    </android.support.constraint.ConstraintLayout>
                 </RelativeLayout>
 
                 <com.sheep.gamegroup.util.MyListview
                     android:id="@+id/detail_task_recyclerview"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:scrollbars="none"
-                    android:listSelector="@color/transparent"
-                    android:divider="@null"
                     android:layout_marginStart="@dimen/content_padding_10"
                     android:layout_marginEnd="@dimen/content_padding_10"
-                    android:visibility="visible"/>
+                    android:divider="@null"
+                    android:listSelector="@color/transparent"
+                    android:scrollbars="none"
+                    android:visibility="visible" />
 
                 <com.sheep.gamegroup.util.MyListview
                     android:id="@+id/detail_task_listview"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:scrollbars="none"
-                    android:listSelector="@color/transparent"
-                    android:divider="@null"
+                    android:layout_margin="@dimen/content_padding_10"
                     android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:divider="@null"
+                    android:listSelector="@color/transparent"
                     android:padding="@dimen/content_padding_10"
-                    android:layout_margin="@dimen/content_padding_10"
-                    android:visibility="gone"/>
+                    android:scrollbars="none"
+                    android:visibility="gone" />
 
                 <LinearLayout
                     android:id="@+id/detail_item_layout_2"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-                    android:padding="@dimen/content_padding_20"
                     android:layout_marginLeft="@dimen/content_padding_10"
-                    android:layout_marginRight="@dimen/content_padding_10"
                     android:layout_marginTop="@dimen/content_padding_10"
+                    android:layout_marginRight="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
                     android:orientation="vertical"
+                    android:padding="@dimen/content_padding_20"
                     android:visibility="gone">
 
                     <TextView
+                        style="@style/nomal_txt_style"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:text="@string/task_description"
-                        style="@style/nomal_txt_style"
-                        android:layout_marginBottom="@dimen/content_padding_small"/>
+                        android:layout_marginBottom="@dimen/content_padding_small"
+                        android:text="@string/task_description" />
 
                     <com.tencent.smtt.sdk.WebView
                         android:id="@+id/web_text"
                         android:layout_width="match_parent"
-                        android:layout_height="wrap_content"/>
+                        android:layout_height="wrap_content" />
                 </LinearLayout>
 
                 <LinearLayout
                     android:id="@+id/detail_item_layout_3"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-                    android:padding="@dimen/content_padding_20"
                     android:layout_marginLeft="@dimen/content_padding_10"
-                    android:layout_marginRight="@dimen/content_padding_10"
                     android:layout_marginTop="@dimen/content_padding_10"
+                    android:layout_marginRight="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
                     android:orientation="vertical"
+                    android:padding="@dimen/content_padding_20"
                     android:visibility="gone">
 
                     <TextView
+                        style="@style/nomal_txt_style"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:text="@string/task_progress"
-                        style="@style/nomal_txt_style"
-                        android:layout_marginBottom="@dimen/content_padding_small"/>
+                        android:layout_marginBottom="@dimen/content_padding_small"
+                        android:text="@string/task_progress" />
 
                     <LinearLayout
                         android:id="@+id/ll_infos"
@@ -351,11 +455,9 @@
                     </LinearLayout>
                 </LinearLayout>
                 <!--用户操作-->
-                <include
-                    layout="@layout/taskdetail_item_user_use"/>
+                <include layout="@layout/taskdetail_item_user_use" />
                 <!--温馨提示-->
-                <include
-                    layout="@layout/taskdetail_item_supplement_explain"/>
+                <include layout="@layout/taskdetail_item_supplement_explain" />
             </LinearLayout>
         </android.support.v4.widget.NestedScrollView>
 
@@ -364,8 +466,8 @@
             android:id="@+id/bottom_btn_layout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:minHeight="?attr/actionBarSize"
             android:background="@color/background_light_gray"
+            android:minHeight="?attr/actionBarSize"
             android:orientation="horizontal">
 
             <TextView
@@ -374,7 +476,7 @@
                 android:layout_width="0dp"
                 android:layout_height="35dp"
                 android:layout_weight="1"
-                android:text="下载游戏"/>
+                android:text="下载游戏" />
 
             <TextView
                 android:id="@+id/btn_up_imag"
@@ -382,10 +484,9 @@
                 android:layout_width="0dp"
                 android:layout_height="35dp"
                 android:layout_weight="1"
-                android:text="上传截图"/>
+                android:text="上传截图" />
         </LinearLayout>
     </LinearLayout>
 
 
-
 </LinearLayout>

+ 10 - 13
app/src/main/res/layout/try_makemoney_item_recommend.xml

@@ -198,30 +198,27 @@
             app:layout_constraintTop_toBottomOf="@id/item_top_v">
 
             <TextView
-                android:id="@+id/item_money_vip_tv"
-                android:layout_width="wrap_content"
+                android:id="@+id/item_money"
+                android:layout_width="@dimen/find_bt_with"
                 android:layout_height="wrap_content"
                 android:gravity="center"
-                android:minWidth="@dimen/find_bt_with"
-                android:text="会员:+11元"
+                android:text="+10元"
                 android:textColor="@color/txt_red"
-                android:textSize="10sp" />
-
+                android:textSize="18sp" />
             <View
                 android:layout_width="1dp"
                 android:layout_height="0dp"
                 android:layout_weight="1" />
 
             <TextView
-                android:id="@+id/item_money"
-                android:layout_width="@dimen/find_bt_with"
+                android:id="@+id/item_money_vip_tv"
+                android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="5dp"
                 android:gravity="center"
-                android:text="+10元"
-                android:textColor="@color/txt_red"
-                android:textSize="15sp" />
-
+                android:minWidth="@dimen/find_bt_with"
+                android:text="会员:+11元"
+                android:textColor="#C3995E"
+                android:textSize="10sp" />
             <View
                 android:layout_width="1dp"
                 android:layout_height="0dp"

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

@@ -12,4 +12,5 @@
     <string name="error_package_link">暂无包名,请稍候再试</string>
     <string name="wushuju">还没有数据哦</string>
     <string name="wushuju_net_error">网络错误,请稍候再试</string>
+    <string name="please_contact_customer_service">数据错误,请联系客服</string>
 </resources>

+ 5 - 0
app/src/main/res/values/strings.xml

@@ -203,4 +203,9 @@
     <string name="tip_finish_task_in_time_or_repeat">若1小时35分22秒后奖励未完成,该奖励自动取消,您可以重新接受该奖励</string>
     <string name="tip_click_share_get_benefit_percent">点击下方分享给好友(享受奖励提成):</string>
     <string name="tip_you_can_get_20_percent_from_your_friend">注:通过链接加入小绵羊即为你的好友下线,好友完成奖励你可以额外获得20%的提成奖励哦!</string>
+    <string name="pay_success">支付成功</string>
+    <string name="pay_fail">支付失败</string>
+    <string name="you_had_cancel_pay">您取消了支付</string>
+    <string name="task_detail_vip_tip">做任务可提高收益哦,任务优先审核</string>
+
 </resources>