Procházet zdrojové kódy

修改我的资产与对话框

zengjiebin před 8 roky
rodič
revize
04393abaa1

+ 98 - 83
app/src/main/java/com/kfzs/duanduan/fragment/FgtPersonalCenter.java

@@ -42,6 +42,7 @@ import butterknife.ButterKnife;
 import butterknife.OnClick;
 import butterknife.Unbinder;
 import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
 /**
@@ -71,6 +72,7 @@ public class FgtPersonalCenter extends BaseCompatFragment {
     private UserEntity userEntitys;
     private String faqUrl;
     private String agentUrl;
+
     @Override
     protected void initView(Bundle savedInstanceState) {
         setContentView(R.layout.fgt_personalcenter_layout);
@@ -78,99 +80,106 @@ public class FgtPersonalCenter extends BaseCompatFragment {
 
     private void initData() {
         SheepApp.getInstance().getNetComponent().getApiService().getInfo()
-                        .subscribeOn(Schedulers.io())
-                        .observeOn(AndroidSchedulers.mainThread())
-                        .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
-                            @Override
-                            public void onNext(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
-                                updateData(baseMessage);
-                            }
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
+                        updateData(baseMessage);
+                    }
 
-                            @Override
-                            public void onError(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
-                            }
-                        });
-        if(TextUtils.isEmpty(faqUrl))
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
+                    }
+                });
+        if (TextUtils.isEmpty(faqUrl))
             SheepApp.getInstance().getNetComponent().getApiService().getFaqUrl()
-                        .subscribeOn(Schedulers.io())
-                        .observeOn(AndroidSchedulers.mainThread())
-                        .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
-                            @Override
-                            public void onNext(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
-                                Ext ext = baseMessage.getData(Ext.class);
-                                if(ext != null && !TextUtils.isEmpty(ext.getUrl())){
-                                    faqUrl = ext.getUrl();
-                                }
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
+                            Ext ext = baseMessage.getData(Ext.class);
+                            if (ext != null && !TextUtils.isEmpty(ext.getUrl())) {
+                                faqUrl = ext.getUrl();
                             }
+                        }
 
-                            @Override
-                            public void onError(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
-                            }
-                        });
-        if(TextUtils.isEmpty(agentUrl))
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
+                        }
+                    });
+        if (TextUtils.isEmpty(agentUrl))
             SheepApp.getInstance().getNetComponent().getApiService().getAgentUrl()
-                        .subscribeOn(Schedulers.io())
-                        .observeOn(AndroidSchedulers.mainThread())
-                        .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
-                            @Override
-                            public void onNext(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
-                                Ext ext = baseMessage.getData(Ext.class);
-                                if(ext != null && !TextUtils.isEmpty(ext.getUrl())){
-                                    agentUrl = ext.getUrl();
-                                }
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
+                            Ext ext = baseMessage.getData(Ext.class);
+                            if (ext != null && !TextUtils.isEmpty(ext.getUrl())) {
+                                agentUrl = ext.getUrl();
                             }
+                        }
 
-                            @Override
-                            public void onError(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
-                            }
-                        });
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
+                        }
+                    });
         getVersionInfo();
         getShardData();
+        initCacheSize();
 
+    }
+
+    private void initCacheSize() {
         String size = SysAppUtil.getAppCacheSize();
-        clear_item_tv.setText(TextUtils.isEmpty(size) ? "无需清理":size);
+        clear_item_tv.setText(TextUtils.isEmpty(size) || TextUtils.equals("0K",size) ? "无需清理" : size);
     }
+
     private VersionInfo versionInfo;
+
     private void loadVersionInfo() {
         String appVersonName = ApkUtils.getCurrentPkgVersionName(SheepApp.getInstance());
         String serviceVersionName;
-        if(versionInfo == null || TextUtils.isEmpty(serviceVersionName = versionInfo.getVersion_number())){
+        if (versionInfo == null || TextUtils.isEmpty(serviceVersionName = versionInfo.getVersion_number())) {
             version_item_tv.setText("小绵羊");
             version_item_tv.append(appVersonName);
         } else {
-            version_item_tv.setText(TextUtils.equals(appVersonName, serviceVersionName) ?"":"有新版本:");
+            version_item_tv.setText(TextUtils.equals(appVersonName, serviceVersionName) ? "" : "有新版本:");
             version_item_tv.append("小绵羊");
             version_item_tv.append(serviceVersionName);
         }
     }
+
     private void getVersionInfo() {
         version_item_tv.setText("");
         SheepApp.getInstance().getNetComponent().getApiService().getVersionInfo("")
-                        .subscribeOn(Schedulers.io())
-                        .observeOn(AndroidSchedulers.mainThread())
-                        .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
-                            @Override
-                            public void onNext(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onNext "+JSON.toJSONString(baseMessage));
-                                VersionInfo newVersionInfo = baseMessage.getData(VersionInfo.class);
-                                if(newVersionInfo != null) {
-                                    versionInfo = newVersionInfo;
-                                }
-                                loadVersionInfo();
-                            }
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(getContext()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onNext " + JSON.toJSONString(baseMessage));
+                        VersionInfo newVersionInfo = baseMessage.getData(VersionInfo.class);
+                        if (newVersionInfo != null) {
+                            versionInfo = newVersionInfo;
+                        }
+                        loadVersionInfo();
+                    }
 
-                            @Override
-                            public void onError(BaseMessage baseMessage) {
-                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
-                                loadVersionInfo();
-                            }
-                        });
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.println("baseMessage onError " + JSON.toJSONString(baseMessage));
+                        loadVersionInfo();
+                    }
+                });
     }
 
     private void updateData(BaseMessage baseMessage) {
@@ -183,22 +192,22 @@ public class FgtPersonalCenter extends BaseCompatFragment {
         initWidget();
     }
 
-    private void initWidget(){
+    private void initWidget() {
 
-        personalcenter_item_price_tv.setText(userEntitys.getBalance()+" 元");
+        personalcenter_item_price_tv.setText(userEntitys.getBalance() + " 元");
         nameTv.setText(userEntitys.getNickname() + "");//绵羊号:123456789
         sheepNumTv.setText("绵羊号:" + userEntitys.getInvitation_code());
         Glide.with(getActivity())
-                .load(userEntitys.getAvatar()+"")
+                .load(userEntitys.getAvatar() + "")
                 .apply(new RequestOptions().circleCrop().placeholder(R.drawable.icon))
                 .into(iconImgIv);
         //设置是否显示代理服务
         proxy_service_layout_line.setVisibility(
 //                BuildConfig.DEBUG ||
-                        userEntitys.getIs_agent() == 1 ? View.VISIBLE : View.GONE);
+                userEntitys.getIs_agent() == 1 ? View.VISIBLE : View.GONE);
         proxy_service_layout.setVisibility(
 //                BuildConfig.DEBUG ||
-                        userEntitys.getIs_agent() == 1 ? View.VISIBLE : View.GONE);
+                userEntitys.getIs_agent() == 1 ? View.VISIBLE : View.GONE);
     }
 
     @Override
@@ -215,6 +224,7 @@ public class FgtPersonalCenter extends BaseCompatFragment {
         super.onDestroyView();
         unbinder.unbind();
     }
+
     @OnClick({R.id.icon_img_iv, R.id.account_detail_layout, R.id.personalcenter_price_layout, R.id.account_safe_layout,
             R.id.account_task_layout, R.id.proxy_service_layout, R.id.abourt_us_layout, R.id.feedbook_layout,
             R.id.recommend_friend_layout, R.id.tv_submit, R.id.faq_layout,
@@ -235,13 +245,13 @@ public class FgtPersonalCenter extends BaseCompatFragment {
                 Jump2View.getInstance().goTaskList2View(getActivity(), null);
                 break;
             case R.id.proxy_service_layout://代理
-                if(!TextUtils.isEmpty(agentUrl))
+                if (!TextUtils.isEmpty(agentUrl))
                     Jump2View.getInstance().goWeb(getActivity(), agentUrl, "代理服务");
                 else
                     G.showToast(R.string.loading_data);
                 break;
             case R.id.faq_layout://FAQ帮助
-                if(!TextUtils.isEmpty(faqUrl))
+                if (!TextUtils.isEmpty(faqUrl))
                     Jump2View.getInstance().goWeb(getActivity(), faqUrl, "FAQ帮助");
                 else
                     Jump2View.getInstance().goWeb(getActivity(), "http://smallstation.kfzs.com/h5_faq/#/faq", "FAQ帮助");
@@ -260,16 +270,21 @@ public class FgtPersonalCenter extends BaseCompatFragment {
                                 getActivity());
                 break;
             case R.id.recommend_friend_layout://推荐给好友
-                if(Ety!= null){
-                    ViewUtil.shareLink(getActivity(),Ety.getShare_link());
+                if (Ety != null) {
+                    ViewUtil.shareLink(getActivity(), Ety.getShare_link());
                 }
                 break;
             case R.id.version_layout://版本更新
                 Beta.checkUpgrade();//检查版本号
                 break;
             case R.id.clear_layout://清除缓存
-                Glide.get(getActivity()).clearDiskCache();//清理图片
-                ClassFileHelper.getInstance().clearDir();//清理下载文件
+                SysAppUtil.clearCache(new Action1<Object>() {
+                    @Override
+                    public void call(Object o) {
+                        G.showToast("清理缓存完成");
+                        initCacheSize();
+                    }
+                });
                 break;
             case R.id.change_layout://新功能介绍
                 Jump2View.getInstance().goVersionChange(getActivity(), ApkUtils.getCurrentPkgVersionName(SheepApp.getInstance()));
@@ -287,7 +302,7 @@ public class FgtPersonalCenter extends BaseCompatFragment {
     /**
      * 获取分享数据
      */
-    private void  getShardData(){
+    private void getShardData() {
         SheepApp.get(getActivity()).getNetComponent().getApiService().FriendCountAndAward()
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -299,9 +314,9 @@ public class FgtPersonalCenter extends BaseCompatFragment {
 
                     @Override
                     public void onNext(BaseMessage baseMessage) {
-                        if(baseMessage!=null){
-                            Ety = FastJsonUtils.toBean( JSONObject.toJSONString(baseMessage.getData()),FriendAndAwardEntity.class);
-                        }else{
+                        if (baseMessage != null) {
+                            Ety = FastJsonUtils.toBean(JSONObject.toJSONString(baseMessage.getData()), FriendAndAwardEntity.class);
+                        } else {
                             showToast("数据解析出错");
                         }
 
@@ -313,9 +328,9 @@ public class FgtPersonalCenter extends BaseCompatFragment {
     @Override
     public void onResume() {
         super.onResume();
-        try{
+        try {
             initData();
-        }catch (Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
         }
     }

+ 0 - 28
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -444,34 +444,6 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
             case R.id.icon_layout://
                 if(BuildConfig.DEBUG) {
                     TestUtil.test(activity);
-                    new ShareAction(getActivity())
-                            .withText("hehe")
-                            .setDisplayList(
-                                    SHARE_MEDIA.QQ,
-                                    SHARE_MEDIA.WEIXIN)
-                            .setCallback(new UMShareListener() {
-                                @Override
-                                public void onStart(SHARE_MEDIA share_media) {
-                                    Log.e("start---"+share_media.getName(), share_media.getName());
-                                }
-
-                                @Override
-                                public void onResult(SHARE_MEDIA share_media) {
-                                    Log.e("result---"+share_media.getName(), share_media.getName());
-                                }
-
-                                @Override
-                                public void onError(SHARE_MEDIA share_media, Throwable throwable) {
-                                    Log.e("error---"+share_media.getName(), share_media.getName());
-                                }
-
-                                @Override
-                                public void onCancel(SHARE_MEDIA share_media) {
-                                    Log.e("cancel---"+share_media.getName(), share_media.getName());
-                                }
-                            })
-                            .open();
-
                 }else
                     Jump2View.getInstance().goPersonnalCenterView(activity, null);
                 break;

+ 8 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/OrienteeringDetail.java

@@ -0,0 +1,8 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/6/7.
+ * realicing@sina.com
+ */
+public class OrienteeringDetail {
+}

+ 6 - 6
app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java

@@ -65,8 +65,8 @@ public class UserEntity implements Serializable {
     private int is_new;//1新用户 2老用户
     @Column(name = "is_agent")
     private int is_agent;//0不是代理 1是代理
-    @Column(name = "first_certification")
-    private int first_certification;//实名认证次数
+    @Column(name = "certification_count")
+    private int certification_count;//实名认证次数
 
     public String getWx_nickname() {
         return wx_nickname;
@@ -268,12 +268,12 @@ public class UserEntity implements Serializable {
         this.bank_card_mobile = bank_card_mobile;
     }
 
-    public int getFirst_certification() {
-        return first_certification;
+    public int getCertification_count() {
+        return certification_count;
     }
 
-    public void setFirst_certification(int first_certification) {
-        this.first_certification = first_certification;
+    public void setCertification_count(int certification_count) {
+        this.certification_count = certification_count;
     }
 
     public boolean isNewRegistUser() {//新注册用户

+ 33 - 0
app/src/main/java/com/sheep/gamegroup/util/SysAppUtil.java

@@ -5,6 +5,7 @@ import android.content.Intent;
 import android.os.Build;
 import android.provider.AlarmClock;
 
+import com.bumptech.glide.Glide;
 import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory;
 import com.kfzs.duanduan.utils.ApkUtils;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
@@ -17,6 +18,13 @@ import java.io.File;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.concurrent.TimeUnit;
+
+import rx.Observable;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.functions.Func1;
+import rx.schedulers.Schedulers;
 
 /**
  * Created by realicing on 2018/5/29.
@@ -69,6 +77,30 @@ public class SysAppUtil {
                 ;
     }
 
+    public static void clearCache(final Action1<Object> action1) {
+        Observable.just(1)
+                .map(new Func1<Integer, Integer>() {
+                    @Override
+                    public Integer call(Integer integer) {
+                        Glide.get(SheepApp.getInstance()).clearDiskCache();//清理图片
+                        ClassFileHelper.getInstance().clearDir();//清理下载文件
+                        return integer;
+                    }
+                })
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new Action1<Integer>() {
+                    @Override
+                    public void call(Integer integer) {
+                        action1.call(integer);
+                    }
+                }, new Action1<Throwable>() {
+                    @Override
+                    public void call(Throwable throwable) {
+                        action1.call(throwable);
+                    }
+                });
+    }
     public static String getAppCacheSize() {
         try {
 //            File filesDir = SheepApp.getInstance().getExternalFilesDir(null);
@@ -142,4 +174,5 @@ public class SysAppUtil {
         return result4.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString()
                 + "TB";
     }
+
 }

+ 27 - 1
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -15,6 +15,7 @@ import android.widget.ArrayAdapter;
 import android.widget.TextView;
 
 import com.sheep.gamegroup.model.entity.CreditCard;
+import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -22,6 +23,7 @@ import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.io.File;
+import java.util.Locale;
 
 import static com.sheep.jiuyan.samllsheep.utils.ClassFileHelper.DIR;
 
@@ -165,7 +167,7 @@ public class TestUtil {
      * @param activity
      */
     public static void test(final Activity activity) {
-        final String[] items = {"交通银行信用卡测试", "浦发银行信用卡测试", "测试游戏模块"};
+        final String[] items = {"交通银行信用卡测试", "浦发银行信用卡测试", "测试游戏模块","打卡成功提示","定向消费详情","提交身份认证时的提示"};
         AlertDialog dialog = new AlertDialog.Builder(activity).setTitle("请选择要测试的信用卡")
                 .setItems(items, new DialogInterface.OnClickListener() {
 
@@ -184,6 +186,30 @@ public class TestUtil {
                             case "测试游戏模块":
                                 Jump2View.getInstance().goMainGame(activity);
                                 break;
+                            case "打卡成功提示":
+                                ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("恭喜您").setMsg("打卡成功,活动结束后平分奖励会直接发放到个人账户中")
+                                        .setBtnLeftText("好的").setBtnRightText("查看战绩")
+                                        .setBtnRightOnClickListener(new View.OnClickListener() {
+                                            @Override
+                                            public void onClick(View view) {
+                                                Jump2View.getInstance().goSignRecordAct(activity, null);
+                                            }
+                                        }));
+                                break;
+                            case "定向消费详情":
+                                ViewUtil.showOrienteeringDetails();
+                                break;
+                            case "提交身份认证时的提示":
+                                ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("重要提示").setMsgMore(String.format(Locale.CHINA,"你已执行%d次实名认证操作", 0))
+                                        .setMsg("实名认证首次免费。请务必确认您所提交的认证信息真实有效。若因信息填写错误造成认证失败。再次申请认证时需扣除您0.5元绵阳币作为认证费用,请务必谨慎填写认证信息。")
+                                        .setBtnLeftText("返回修改").setBtnRightText("确认提交")
+                                        .setBtnRightOnClickListener(new View.OnClickListener() {
+                                            @Override
+                                            public void onClick(View view) {
+                                                G.showToast("下一步提交");
+                                            }
+                                        }));
+                                break;
                             case "浦发银行信用卡测试":
                                 CreditCard creditCard1 = new CreditCard();
                                 creditCard1.setCardName(items[which]);

+ 99 - 10
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -14,11 +14,13 @@ import android.text.method.ScrollingMovementMethod;
 import android.view.LayoutInflater;
 import android.view.SurfaceHolder;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.Window;
 import android.view.WindowManager;
 import android.webkit.WebView;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.VideoView;
 
@@ -26,7 +28,9 @@ import com.bumptech.glide.Glide;
 import com.bumptech.glide.request.RequestOptions;
 import com.sheep.gamegroup.model.entity.Advertising;
 import com.sheep.gamegroup.model.entity.DialogConfig;
+import com.sheep.gamegroup.model.entity.OrienteeringDetail;
 import com.sheep.gamegroup.view.activity.SplashAct;
+import com.sheep.gamegroup.view.adapter.ArrayAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -35,6 +39,7 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.util.List;
 
 /**
  * Created by realicing on 2018/5/11.
@@ -59,7 +64,11 @@ public class ViewUtil {
                 .load(R.drawable.icon)
                 .apply(new RequestOptions().override(G.WIDTH / 5))
                 .into(iv_qr_small);
-        dialog.show();
+        try {
+            dialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
         Window window = dialog.getWindow();
         if (window != null) {
             android.view.WindowManager.LayoutParams p = window.getAttributes();
@@ -152,7 +161,11 @@ public class ViewUtil {
                 G.showToast("已保存");
             }
         });
-        dialog.show();
+        try {
+            dialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
 
     }
 
@@ -222,11 +235,11 @@ public class ViewUtil {
 
 
     public static void showMsgDialog(final Activity activity, String msg) {
-        showMsgDialog(activity, new DialogConfig().setMsg(msg));
+        showMsgDialog(activity, new DialogConfig().setMsg(msg).setBtnLeftText("知道了"));
     }
 
     public static void showMsgDialog(final Activity activity, String msg, String title) {
-        showMsgDialog(activity, new DialogConfig().setMsg(msg).setTitle(title));
+        showMsgDialog(activity, new DialogConfig().setMsg(msg).setTitle(title).setBtnLeftText("知道了"));
     }
 
     public static void showMsgDialog(final Activity activity, DialogConfig dialogConfig) {
@@ -269,7 +282,8 @@ public class ViewUtil {
         }
 
         TextView dialog_btn_left = view.findViewById(R.id.dialog_btn_left);
-        dialog_btn_left.setVisibility(btnLeftText != null || btnLeftOnClickListener != null ? View.VISIBLE : View.GONE);
+        boolean isLeftBtnShow = btnLeftText != null || btnLeftOnClickListener != null;
+        dialog_btn_left.setVisibility(isLeftBtnShow ? View.VISIBLE : View.GONE);
         if (!TextUtils.isEmpty(btnLeftText))
             dialog_btn_left.setText(btnLeftText);
         dialog_btn_left.setOnClickListener(new View.OnClickListener() {
@@ -283,25 +297,33 @@ public class ViewUtil {
         });
 
         TextView dialog_btn_right = view.findViewById(R.id.dialog_btn_right);
-        dialog_btn_right.setVisibility(btnRightText != null || btnRightOnClickListener != null ? View.VISIBLE : View.GONE);
+        boolean isRigthBtnShow = btnRightText != null || btnRightOnClickListener != null;
+        dialog_btn_right.setVisibility(isRigthBtnShow ? View.VISIBLE : View.GONE);
         if (!TextUtils.isEmpty(btnRightText))
             dialog_btn_right.setText(btnRightText);
         dialog_btn_right.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                if (btnLeftOnClickListener != null) {
-                    btnLeftOnClickListener.onClick(v);
+                if (btnRightOnClickListener != null) {
+                    btnRightOnClickListener.onClick(v);
                 }
                 dialog.dismiss();
             }
         });
+        View dialog_btn_center = view.findViewById(R.id.dialog_btn_center);
+        dialog_btn_center.setVisibility(isLeftBtnShow && isRigthBtnShow ? View.VISIBLE : View.GONE);
+
         dialog_close.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 dialog.dismiss();
             }
         });
-        dialog.show();
+        try {
+            dialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 
     public static final int REQUEST_CODE_TASK_LIST = 110;
@@ -400,7 +422,74 @@ public class ViewUtil {
             } else {
                 ad_msg.setText(advertising.getDesc());
             }
-            dialog.show();
+            try {
+                dialog.show();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+    //显示定向消费详情
+    public static void showOrienteeringDetails() {
+        final Activity activity = ActivityManager.getInstance().currentActivity();
+        if (activity != null) {
+            View dialog_parent = View.inflate(activity, R.layout.dialog_parent, null);
+            final AlertDialog dialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
+                    .setView(dialog_parent)
+                    .create();
+            TextView dialog_title = dialog_parent.findViewById(R.id.dialog_title);
+            final View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
+            LinearLayout dialog_center_ll = dialog_parent.findViewById(R.id.dialog_center_ll);
+            View view = LayoutInflater.from(activity).inflate(R.layout.dialog_orienteering_details, dialog_center_ll, true);
+            dialog_title.setText("定向消费详情");
+
+            ListView dialog_list_view = (ListView)view.findViewById(R.id.dialog_list_view);
+            TextView dialog_btn_left = (TextView)view.findViewById(R.id.dialog_btn_left);
+            TextView dialog_btn_right = (TextView)view.findViewById(R.id.dialog_btn_right);
+
+            List<OrienteeringDetail> list = ListUtil.emptyList();
+            list.add(new OrienteeringDetail());
+            list.add(new OrienteeringDetail());
+            list.add(new OrienteeringDetail());
+            dialog_list_view.setAdapter(new ArrayAdapter<OrienteeringDetail>(activity, R.layout.dialog_orienteering_details_item, list){
+                @Override
+                public boolean convert(int position, View convertView, ViewGroup parent, OrienteeringDetail item) {
+                    //
+                    return true;
+                }
+            });
+            dialog_btn_left.setText("确定");
+            dialog_btn_left.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    dialog.dismiss();
+                }
+            });
+            dialog_btn_right.setText("充值");
+            dialog_btn_right.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    Jump2View.getInstance().goRechargeAct(activity, null);
+                    dialog.dismiss();
+                }
+            });
+            dialog_close.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    dialog.dismiss();
+                }
+            });
+
+            dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
+                @Override
+                public void onDismiss(DialogInterface dialogInterface) {
+                }
+            });
+            try {
+                dialog.show();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
     }
 }

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

@@ -22,6 +22,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserAssets;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -108,7 +109,7 @@ public class ActMyMoney extends BaseActivity {
     public void initListener() {
 
     }
-    @OnClick({ R.id.my_money_withdraw_tv, R.id.my_money_recharge_tv })
+    @OnClick({ R.id.my_money_withdraw_tv, R.id.my_money_recharge_tv, R.id.my_money_dingxiang_amount_iv})
     public void onViewClicked(View view) {
         switch (view.getId()) {
             case R.id.my_money_withdraw_tv://提现
@@ -117,6 +118,9 @@ public class ActMyMoney extends BaseActivity {
             case R.id.my_money_recharge_tv://充值
                 Jump2View.getInstance().goRechargeAct(ActMyMoney.this, null);
                 break;
+            case R.id.my_money_dingxiang_amount_iv://定向消费详情
+                ViewUtil.showOrienteeringDetails();
+                break;
         }
     }
     @Override

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

@@ -136,7 +136,7 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
     @Override
     public void NetSuccess(int code, String msg, String s) {
         hideProgress();
-        showToast(mEntity.getFirst_certification() == 0 ? "认证信息已提交审核,请耐心等待" : "已成功扣除0.5元绵羊币,认证审核中");
+        showToast(mEntity.getCertification_count() == 0 ? "认证信息已提交审核,请耐心等待" : "已成功扣除0.5元绵羊币,认证审核中");
         RealNameAutehrChange change = new RealNameAutehrChange();
         for (String key : map.keySet()) {
             if (key.equals("real_name") && !TextUtils.isEmpty(map.get(key))) {
@@ -215,7 +215,7 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
             G.showToast(R.string.unknown_error);
             return;
         }
-        ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("重要提示").setMsgMore(String.format(Locale.CHINA,"你已执行%d次实名认证操作",mEntity.getFirst_certification()))
+        ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("重要提示").setMsgMore(String.format(Locale.CHINA,"你已执行%d次实名认证操作",mEntity.getCertification_count()))
                 .setMsg("实名认证首次免费。请务必确认您所提交的认证信息真实有效。若因信息填写错误造成认证失败。再次申请认证时需扣除您0.5元绵阳币作为认证费用,请务必谨慎填写认证信息。")
                 .setBtnLeftText("返回修改").setBtnRightText("确认提交")
                 .setBtnRightOnClickListener(new View.OnClickListener() {

+ 9 - 26
app/src/main/java/com/sheep/gamegroup/view/activity/SignCardAct.java

@@ -10,15 +10,12 @@ import android.text.style.AbsoluteSizeSpan;
 import android.view.View;
 import android.widget.TextView;
 
-import com.kfzs.duanduan.event.BigEvent;
-import com.kfzs.duanduan.event.EventTypes;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.di.components.DaggerSignCardComponent;
 import com.sheep.gamegroup.di.modules.SignCardModule;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.DialogConfig;
-import com.sheep.gamegroup.model.entity.DialogEntity;
 import com.sheep.gamegroup.model.entity.PunchAndSign;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.presenter.SignCardContract;
@@ -28,14 +25,12 @@ import com.sheep.gamegroup.util.MyDbManager;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.UMConfigUtils;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
 import java.util.Calendar;
 
 import javax.inject.Inject;
@@ -95,7 +90,6 @@ public class SignCardAct extends BaseActivity implements SignCardContract.View {
                 .signCardModule(new SignCardModule(this))
                 .build()
                 .inject(this);
-        EventBus.getDefault().register(this);
 
     }
 
@@ -122,12 +116,14 @@ public class SignCardAct extends BaseActivity implements SignCardContract.View {
     public void succSignPunch(BaseMessage o) {
 //        {"code":200,"msg":"OK"}
         if ("OK".equals(o.getMsg())) {
-            Jump2View.getInstance()
-                    .goNoticeAct(activity, new DialogEntity("恭喜您",
-                            "打卡成功,活动结束后平分奖励会直接发放到个人账户中",
-                            "查看战绩",
-                            "好的",
-                            EventTypes.REFRESH_DATA_SIGN));
+            ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("恭喜您").setMsg("打卡成功,活动结束后平分奖励会直接发放到个人账户中")
+                    .setBtnLeftText("好的").setBtnRightText("查看战绩")
+                    .setBtnRightOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            Jump2View.getInstance().goSignRecordAct(activity, null);
+                        }
+                    }));
             presenter.goPunchAndSignCount();//(刷新数据)获取可打卡和报名人数
             punchType = 2;//1未报名 2已打卡 3可以打卡 4已经过了时间 5活动暂未开始
             signTvLjdk.setEnabled(false);
@@ -308,17 +304,4 @@ public class SignCardAct extends BaseActivity implements SignCardContract.View {
         return spannableString;
     }
 
-    @Subscribe
-    public void onEventMainThread(BigEvent bigEvent) {
-        if (bigEvent.getEventTypes() == EventTypes.REFRESH_DATA_SIGN) {
-            Jump2View.getInstance().goSignRecordAct(activity, null);
-        }
-    }
-
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
 }

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

@@ -799,7 +799,8 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
                 int p = task.getPercent();    //任务进度百分比
                 String speed = task.getConvertSpeed();    //转换单位后的下载速度,单位转换需要在配置文件中打开
                 long speed1 = task.getSpeed(); //原始byte长度速度
-                btnTaskItem.setText(p + "%");
+                btnTaskItem.setText(String.format(Locale.CHINA, "%d",Math.abs(p)));
+                btnTaskItem.append("%");
                 System.out.println("Aria p " + p + ", speed = " + speed);
             }
         } catch (Exception e) {

+ 7 - 0
app/src/main/res/drawable/shape_ash_stroke_rectangle.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="15dp" />
+    <stroke android:color="@color/black_6_e"
+        android:width="2dp"/>
+</shape>

+ 137 - 65
app/src/main/res/layout/act_my_money.xml

@@ -10,7 +10,7 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="@mipmap/home_blue_bg"
-        android:paddingBottom="@dimen/content_padding_40"
+        android:paddingBottom="52dp"
         android:paddingTop="@dimen/status_bar_height"
         android:paddingEnd="@dimen/content_padding_20"
         android:paddingStart="@dimen/content_padding_20">
@@ -40,100 +40,172 @@
             app:layout_constraintTop_toTopOf="@+id/img_baseactivity_title" />
 
         <TextView
-            android:id="@+id/my_money_total_money"
+            android:id="@+id/my_money_total_money_lable"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/content_padding_10"
-            android:text="@string/total_money"
+            android:text="@string/total_money_lable"
             android:textSize="15sp"
             android:textColor="@color/white"
             app:layout_constraintStart_toStartOf="parent"
             app:layout_constraintTop_toBottomOf="@+id/img_baseactivity_title" />
-
-        <TextView
-            android:id="@+id/my_money_task_reward"
+        <LinearLayout
+            android:id="@+id/my_money_ll"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/content_padding_20"
-            android:text="@string/task_reward"
-            android:textColor="@color/white"
-            android:textSize="12sp"
-            app:layout_constraintStart_toStartOf="@+id/my_money_total_money"
-            app:layout_constraintTop_toBottomOf="@+id/my_money_total_money" />
+            android:orientation="vertical"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toBottomOf="@+id/img_baseactivity_title" >
+            <TextView
+                android:id="@+id/my_money_agent_extract"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/agent_extract"
+                android:textColor="@color/white"
+                android:textSize="12sp" />
+
+            <TextView
+                android:id="@+id/my_money_task_reward"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/task_reward"
+                android:textColor="@color/white"
+                android:layout_marginTop="@dimen/content_padding_20"
+                android:textSize="12sp" />
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:paddingTop="10dp"
+                android:paddingBottom="10dp"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/my_money_dingxiang_amount"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/dingxiang_amount"
+                    android:textColor="@color/white"
+                    android:textSize="12sp" />
+                <ImageView
+                    android:id="@+id/my_money_dingxiang_amount_iv"
+                    android:layout_width="35dp"
+                    android:layout_height="35dp"
+                    android:padding="10dp"
+                    android:src="@mipmap/faq"/>
+            </LinearLayout>
+
+            <TextView
+                android:id="@+id/my_money_recharge_amount"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/recharge_amount"
+                android:textColor="@color/white"
+                android:textSize="12sp"/>
+
+        </LinearLayout>
 
         <TextView
-            android:id="@+id/my_money_agent_extract"
+            android:id="@+id/my_money_available_amount"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/content_padding"
-            android:text="@string/agent_extract"
             android:textColor="@color/white"
             android:textSize="12sp"
-            app:layout_constraintStart_toStartOf="@+id/my_money_total_money"
-            app:layout_constraintTop_toBottomOf="@+id/my_money_task_reward" />
-
+            android:text="@string/available_amount"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintBottom_toBottomOf="@+id/my_money_ll" />
         <TextView
-            android:id="@+id/my_money_recharge_amount"
+            android:id="@+id/my_money_total_money"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/content_padding"
-            android:text="@string/recharge_amount"
+            android:text="@string/total_money"
+            android:layout_marginBottom="@dimen/content_padding_10"
+            android:textSize="25sp"
             android:textColor="@color/white"
-            android:textSize="12sp"
-            app:layout_constraintStart_toStartOf="@+id/my_money_total_money"
-            app:layout_constraintTop_toBottomOf="@+id/my_money_agent_extract" />
-
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintBottom_toTopOf="@+id/my_money_available_amount" />
 
-        <TextView
-            android:id="@+id/my_money_recharge_tv"
-            android:layout_width="wrap_content"
-            android:layout_height="36dp"
-            android:textColor="@color/white"
-            android:gravity="center"
-            android:background="@drawable/shape_white_stroke_rectangle"
-            android:paddingStart="@dimen/content_padding_30"
-            android:paddingEnd="@dimen/content_padding_30"
-            android:textSize="17sp"
-            android:text="充值"
-            app:layout_constraintBottom_toTopOf="@+id/my_money_withdraw_tv"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/img_baseactivity_title" />
+    </android.support.constraint.ConstraintLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="-37dp"
+        android:layout_marginEnd="@dimen/content_padding_10"
+        android:layout_marginStart="@dimen/content_padding_10"
+        android:orientation="vertical"
+        android:background="@drawable/x_shap_shadow_bg_rectgangle_white">
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:paddingTop="@dimen/content_padding_10"
+            android:paddingBottom="@dimen/content_padding_10"
+            android:paddingStart="@dimen/content_padding_20"
+            android:paddingEnd="@dimen/content_padding_20"
+            android:orientation="horizontal">
+            <ImageView
+                android:layout_width="20dp"
+                android:layout_height="20dp"
+                android:src="@drawable/selector_tab_my_money1"/>
+            <TextView
+                android:id="@+id/my_money_recharge_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/content_padding_10"
+                android:layout_weight="1"
+                android:textColor="@color/gray_4"
+                android:textSize="17sp"
+                android:text="充值"/>
+            <ImageView
+                android:layout_width="15dp"
+                android:layout_height="15dp"
+                android:src="@mipmap/x_ic_next"/>
 
-        <TextView
-            android:id="@+id/my_money_withdraw_tv"
-            android:layout_width="wrap_content"
-            android:layout_height="36dp"
-            android:textColor="#34A6E7"
-            android:gravity="center"
-            android:background="@drawable/shape_white_solid_rectangle"
-            android:paddingStart="@dimen/content_padding_30"
-            android:paddingEnd="@dimen/content_padding_30"
-            android:textSize="17sp"
-            android:text="提现"
-            android:layout_marginTop="5dp"
-            app:layout_constraintBottom_toTopOf="@+id/my_money_available_amount"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/my_money_recharge_tv" />
+        </LinearLayout>
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="@color/white_bg_line"
+            android:layout_marginLeft="@dimen/content_padding_20"
+            android:layout_marginRight="@dimen/content_padding_20"
+            />
 
-        <TextView
-            android:id="@+id/my_money_available_amount"
-            android:layout_width="wrap_content"
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textColor="@color/white"
-            android:textSize="12sp"
-            android:text="@string/available_amount"
-            app:layout_constraintBaseline_toBaselineOf="@+id/my_money_recharge_amount"
-            app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@+id/my_money_withdraw_tv" />
-    </android.support.constraint.ConstraintLayout>
+            android:gravity="center_vertical"
+            android:paddingTop="@dimen/content_padding_10"
+            android:paddingBottom="@dimen/content_padding_10"
+            android:paddingStart="@dimen/content_padding_20"
+            android:paddingEnd="@dimen/content_padding_20"
+            android:orientation="horizontal">
+            <ImageView
+                android:layout_width="20dp"
+                android:layout_height="20dp"
+                android:src="@drawable/selector_tab_my_money1"/>
+            <TextView
+                android:id="@+id/my_money_withdraw_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/content_padding_10"
+                android:layout_weight="1"
+                android:textColor="@color/gray_4"
+                android:textSize="17sp"
+                android:text="提现"/>
+            <ImageView
+                android:layout_width="15dp"
+                android:layout_height="15dp"
+                android:src="@mipmap/x_ic_next"/>
 
+        </LinearLayout>
+    </LinearLayout>
     <android.support.design.widget.TabLayout
         android:id="@+id/indicator"
         android:layout_width="match_parent"
         android:layout_height="50dp"
+        android:layout_marginTop="@dimen/content_padding_20"
         android:layout_marginEnd="@dimen/content_padding_10"
         android:layout_marginStart="@dimen/content_padding_10"
-        android:layout_marginTop="-25dp"
         android:background="@drawable/shape_white_solid_rectangle_small"
         app:tabGravity="fill"
         app:tabIndicatorColor="#4bc1fe"

+ 17 - 0
app/src/main/res/layout/dialog_orienteering_details.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+    <ListView
+        android:id="@+id/dialog_list_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_margin="@dimen/content_padding_10"
+        android:listSelector="@null"
+        android:dividerHeight="1dp"
+        android:divider="@color/black_6_e"
+        android:background="@drawable/shape_ash_stroke_rectangle"/>
+    <include layout="@layout/x_msg_dialog_btn"/>
+
+</LinearLayout>

+ 28 - 0
app/src/main/res/layout/dialog_orienteering_details_item.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:gravity="center_vertical"
+    android:orientation="horizontal">
+    <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:textColor="@color/black_6_3"
+        android:gravity="center"
+        android:textSize="16sp"
+        android:text="大圣不取经"/>
+    <View
+        android:layout_width="1dp"
+        android:layout_height="50dp"
+        android:background="@color/black_6_e"/>
+    <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:textColor="@color/black_6_3"
+        android:gravity="center"
+        android:textSize="16sp"
+        android:text="余额50元"/>
+
+</LinearLayout>

+ 2 - 27
app/src/main/res/layout/x_msg_dialog.xml

@@ -13,7 +13,7 @@
         android:layout_marginBottom="@dimen/content_padding_20"
         android:lineSpacingExtra="2dp"
         android:text="内容"
-        android:gravity="center_horizontal"
+        android:gravity="start"
         android:textColor="@color/black_text_deep"
         android:textSize="20sp" />
     <TextView
@@ -30,32 +30,7 @@
         android:textColor="@color/red"
         android:visibility="gone"
         android:textSize="24sp" />
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-
-        <TextView
-            android:id="@+id/dialog_btn_left"
-            style="@style/style_button"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:layout_marginBottom="@dimen/content_padding_20"
-            android:layout_marginLeft="@dimen/content_padding_20"
-            android:layout_marginRight="@dimen/content_padding_20"
-            android:layout_marginTop="40dp"
-            android:text="我知道了" />
-        <TextView
-            android:id="@+id/dialog_btn_right"
-            style="@style/style_button_stroke"
-            android:layout_width="0dp"
-            android:layout_weight="1"
-            android:layout_marginBottom="@dimen/content_padding_20"
-            android:layout_marginLeft="@dimen/content_padding_20"
-            android:layout_marginRight="@dimen/content_padding_20"
-            android:layout_marginTop="40dp"
-            android:text="确认提交" />
-    </LinearLayout>
+    <include layout="@layout/x_msg_dialog_btn"/>
     <TextView
         android:id="@+id/dialog_tip"
         android:layout_width="match_parent"

+ 28 - 0
app/src/main/res/layout/x_msg_dialog_btn.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginEnd="@dimen/content_padding_20"
+    android:layout_marginStart="@dimen/content_padding_20"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/dialog_btn_left"
+        style="@style/style_button"
+        android:layout_width="0dp"
+        android:layout_weight="5"
+        android:text="我知道了" />
+
+    <View
+        android:id="@+id/dialog_btn_center"
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_weight="1" />
+
+    <TextView
+        android:id="@+id/dialog_btn_right"
+        style="@style/style_button_stroke"
+        android:layout_width="0dp"
+        android:layout_weight="5"
+        android:text="确认提交" />
+</LinearLayout>

+ 7 - 4
app/src/main/res/values/strings.xml

@@ -21,11 +21,14 @@
     <string name="last_page">&#060;</string>
     <string name="next_page">&#062;</string>
 
-    <string name="total_money">绵羊币总资产:%s元</string>
-    <string name="task_reward">任务奖励:%s元</string>
-    <string name="agent_extract">代理提成:%s元</string>
-    <string name="recharge_amount">充值金额:%s元</string>
+    <string name="total_money_lable">绵羊币总资产:</string>
+    <string name="total_money">@string/sign_record_money</string>
+    <string name="task_reward">任务奖励余额:%s元</string>
+    <string name="agent_extract">推广提成:%s元</string>
+    <string name="recharge_amount">充值余额:%s元</string>
     <string name="available_amount">可提现金额:%s元</string>
+    <string name="dingxiang_amount">定向消费:%s元</string>
+
     <string name="rechargeq_amount">当前绵羊币余额:%s元</string>
 
     <string name="feedback_notice_hellow">致亲爱的您,\n &#160;&#160;&#160;&#160;&#160;我们会重视您提出的每一个建议。您的批评与意见是我们产品前进的动力,感谢您对小绵羊APP的支持!</string>

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

@@ -71,5 +71,6 @@
     <color name="blue_2c72f4">#2c72f4</color>
     <color name="bg_line">#66666666</color>
     <color name="black_6_3">#333333</color>
+    <color name="black_6_e">#eeeeee</color>
 
 </resources>