Browse Source

Merge branch 'sheep2.0' of http://10.8.230.114:3000/kemllor/small_sheep_android into sheep2.0

liujiangyao 8 years ago
parent
commit
62ac243be2
22 changed files with 511 additions and 293 deletions
  1. 2 1
      app/src/main/java/com/kfzs/duanduan/KFZSApp.java
  2. 8 0
      app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java
  3. 4 4
      app/src/main/java/com/kfzs/duanduan/services/DownloadTaskService.java
  4. 14 2
      app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java
  5. 0 206
      app/src/main/java/com/sheep/gamegroup/model/entity/UserInfoEntity.java
  6. 2 2
      app/src/main/java/com/sheep/gamegroup/presenter/AccountAndSecuritContract.java
  7. 2 2
      app/src/main/java/com/sheep/gamegroup/presenter/AccountAndSecuritPresenter.java
  8. 1 1
      app/src/main/java/com/sheep/gamegroup/presenter/RealNameAutherPresenter.java
  9. 1 1
      app/src/main/java/com/sheep/gamegroup/presenter/SmallSheepPresenter.java
  10. 1 1
      app/src/main/java/com/sheep/gamegroup/util/AppUtil.java
  11. 3 3
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  12. 7 7
      app/src/main/java/com/sheep/gamegroup/view/activity/AccountAndSecurityAct.java
  13. 2 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActMingShengWeb.java
  14. 389 7
      app/src/main/java/com/sheep/gamegroup/view/activity/ActZhongXinWeb.java
  15. 5 26
      app/src/main/java/com/sheep/gamegroup/view/activity/AskGetMoneyAct.java
  16. 33 14
      app/src/main/java/com/sheep/gamegroup/view/activity/PersionInfoAct.java
  17. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/PersonalCenterAct.java
  18. 3 3
      app/src/main/java/com/sheep/gamegroup/view/activity/RealNameAuthenAct.java
  19. 15 4
      app/src/main/res/layout/x_ask_qr_dialog.xml
  20. 15 3
      app/src/main/res/layout/xpersion_info_act_layout.xml
  21. 1 1
      datashare/build.gradle
  22. 2 2
      datashare/src/main/java/com/kfzs/duanduan/data/graph/provider/channel/DaoMaster.java

+ 2 - 1
app/src/main/java/com/kfzs/duanduan/KFZSApp.java

@@ -220,7 +220,8 @@ public class KFZSApp extends MultiDexApplication {
 
 // Setting timeout globally for the download network requests:
         PRDownloaderConfig config = PRDownloaderConfig.newBuilder()
-                .setReadTimeout(500)
+                .setReadTimeout(500_000)
+                .setConnectTimeout(500_000)
                 .build();
         PRDownloader.initialize(getApplicationContext(), config);
 

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

@@ -24,6 +24,7 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
 import com.bumptech.glide.request.RequestOptions;
 import com.kfzs.duanduan.BaseCompatFragment;
 import com.kfzs.duanduan.event.BigEvent;
@@ -39,6 +40,7 @@ import com.sheep.gamegroup.model.entity.MoreDataEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.presenter.SmallSheepContract;
 import com.sheep.gamegroup.presenter.SmallSheepPresenter;
+import com.sheep.gamegroup.util.AppUtil;
 import com.sheep.gamegroup.util.ImageGlarryDrawable;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.MyDbManager;
@@ -243,12 +245,18 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
             MyDbManager.getInstance().saveOrUpdateUser(userEntity);
             SpUtils.savePhone(activity, userEntity.getMobile());
             SpUtils.saveWeixin(activity, userEntity.getWx_nickname());
+
 //            userEntity = MyDbManager.getInstance().dbFindUser();
             Log.e("------userEntity", userEntity.getNickname() + "|" + userEntity.getMobile() + "");
         } catch (Exception e) {
             e.printStackTrace();
         }
         mHanderl.sendEmptyMessage(0);
+        //PersionInfoAct.java与AskGetMoneyAct.java中分享二维码时的图片预下载
+        Glide.with(this)
+                .load(AppUtil.getQRLink(userEntity.getShare_link(), 800))
+                .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
+                .preload(800, 800);
 
     }
 

+ 4 - 4
app/src/main/java/com/kfzs/duanduan/services/DownloadTaskService.java

@@ -403,10 +403,10 @@ public class DownloadTaskService {
 
             @Override
             public void onError(Error error) {
-                if(error.isConnectionError()){
-                    PRDownloader.resume(statusInfo.getDownloadId());
-                    return;
-                }
+//                if(error.isConnectionError()){
+//                    PRDownloader.resume(statusInfo.getDownloadId());
+//                    return;
+//                }
                 statusInfo.setStatus(DownloadTaskService.STATUS_FAIL);
                 statusInfo.setMessage(error.toString());
                 EventBus.getDefault().post(statusInfo);

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

@@ -3,11 +3,13 @@ package com.sheep.gamegroup.model.entity;
 import org.xutils.db.annotation.Column;
 import org.xutils.db.annotation.Table;
 
+import java.io.Serializable;
+
 /**
  * Created by ljy on 2018/3/17.
  */
 @Table(name = "user")
-public class UserEntity {
+public class UserEntity implements Serializable {
 
     @Column(name = "id", isId = true, autoGen = true)
     private int _id;//11,
@@ -50,7 +52,9 @@ public class UserEntity {
     @Column(name = "wx_openid")
     private String wx_openid;//
     @Column(name = "wx_nickname")
-    private String wx_nickname;//
+    private String wx_nickname;
+    @Column(name = "share_link")
+    private String share_link;
 
     public String getWx_nickname() {
         return wx_nickname;
@@ -211,4 +215,12 @@ public class UserEntity {
     public void setWx_openid(String wx_openid) {
         this.wx_openid = wx_openid;
     }
+
+    public String getShare_link() {
+        return share_link;
+    }
+
+    public void setShare_link(String share_link) {
+        this.share_link = share_link;
+    }
 }

+ 0 - 206
app/src/main/java/com/sheep/gamegroup/model/entity/UserInfoEntity.java

@@ -1,206 +0,0 @@
-/**
- * Copyright 2018 bejson.com
- */
-package com.sheep.gamegroup.model.entity;
-
-
-import java.io.Serializable;
-
-/**
- * Auto-generated: 2018-03-26 11:24:11
- *
- * @author bejson.com (i@bejson.com)
- * @website http://www.bejson.com/java2pojo/
- */
-public class UserInfoEntity  implements Serializable {
-
-    private int id;
-    private String mobile;
-    private String nickname;
-    private double balance;
-    private String invitation_code;
-    private String parent_code;
-    private double total_asset;
-    private long last_login_time;
-    private long create_time;
-    private long update_time;
-    private String avatar;
-    private String access_token;
-    private String refresh_token;
-    private String open_id;
-    private String real_name;
-    private String id_number;
-    private String bank_card;
-    private int total_withdraw;
-    private String wx_openid;
-    private String wx_nickname;
-    private String share_link;
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getMobile() {
-        return mobile;
-    }
-
-    public void setMobile(String mobile) {
-        this.mobile = mobile;
-    }
-
-    public String getNickname() {
-        return nickname;
-    }
-
-    public void setNickname(String nickname) {
-        this.nickname = nickname;
-    }
-
-    public double getBalance() {
-        return balance;
-    }
-
-    public void setBalance(double balance) {
-        this.balance = balance;
-    }
-
-    public String getInvitation_code() {
-        return invitation_code;
-    }
-
-    public void setInvitation_code(String invitation_code) {
-        this.invitation_code = invitation_code;
-    }
-
-    public String getParent_code() {
-        return parent_code;
-    }
-
-    public void setParent_code(String parent_code) {
-        this.parent_code = parent_code;
-    }
-
-    public double getTotal_asset() {
-        return total_asset;
-    }
-
-    public void setTotal_asset(double total_asset) {
-        this.total_asset = total_asset;
-    }
-
-    public long getLast_login_time() {
-        return last_login_time;
-    }
-
-    public void setLast_login_time(long last_login_time) {
-        this.last_login_time = last_login_time;
-    }
-
-    public long getCreate_time() {
-        return create_time;
-    }
-
-    public void setCreate_time(long create_time) {
-        this.create_time = create_time;
-    }
-
-    public long getUpdate_time() {
-        return update_time;
-    }
-
-    public void setUpdate_time(long update_time) {
-        this.update_time = update_time;
-    }
-
-    public String getAvatar() {
-        return avatar;
-    }
-
-    public void setAvatar(String avatar) {
-        this.avatar = avatar;
-    }
-
-    public String getAccess_token() {
-        return access_token;
-    }
-
-    public void setAccess_token(String access_token) {
-        this.access_token = access_token;
-    }
-
-    public String getRefresh_token() {
-        return refresh_token;
-    }
-
-    public void setRefresh_token(String refresh_token) {
-        this.refresh_token = refresh_token;
-    }
-
-    public String getOpen_id() {
-        return open_id;
-    }
-
-    public void setOpen_id(String open_id) {
-        this.open_id = open_id;
-    }
-
-    public String getReal_name() {
-        return real_name;
-    }
-
-    public void setReal_name(String real_name) {
-        this.real_name = real_name;
-    }
-
-    public String getId_number() {
-        return id_number;
-    }
-
-    public void setId_number(String id_number) {
-        this.id_number = id_number;
-    }
-
-    public String getBank_card() {
-        return bank_card;
-    }
-
-    public void setBank_card(String bank_card) {
-        this.bank_card = bank_card;
-    }
-
-    public int getTotal_withdraw() {
-        return total_withdraw;
-    }
-
-    public void setTotal_withdraw(int total_withdraw) {
-        this.total_withdraw = total_withdraw;
-    }
-
-    public String getWx_openid() {
-        return wx_openid;
-    }
-
-    public void setWx_openid(String wx_openid) {
-        this.wx_openid = wx_openid;
-    }
-
-    public String getWx_nickname() {
-        return wx_nickname;
-    }
-
-    public void setWx_nickname(String wx_nickname) {
-        this.wx_nickname = wx_nickname;
-    }
-
-    public String getShare_link() {
-        return share_link;
-    }
-
-    public void setShare_link(String share_link) {
-        this.share_link = share_link;
-    }
-}

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/presenter/AccountAndSecuritContract.java

@@ -2,7 +2,7 @@ package com.sheep.gamegroup.presenter;
 
 import com.sheep.gamegroup.IBase.IBasePresenter;
 import com.sheep.gamegroup.IBase.IBaseView;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 
 /**
  * Created by Administrator on 2018/3/10.
@@ -15,7 +15,7 @@ public interface AccountAndSecuritContract {
     }
 
     interface View extends IBaseView {
-       void   showTask(UserInfoEntity entity);
+       void   showTask(UserEntity entity);
 
 
     }

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/presenter/AccountAndSecuritPresenter.java

@@ -3,7 +3,7 @@ package com.sheep.gamegroup.presenter;
 import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.FastJsonUtils;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -48,7 +48,7 @@ public class AccountAndSecuritPresenter implements  AccountAndSecuritContract.Pr
                         if(baseMessage!=null){
 
 
-                        UserInfoEntity loginEty = FastJsonUtils.toBean( JSONObject.toJSONString(baseMessage.getData()),UserInfoEntity.class);
+                        UserEntity loginEty = FastJsonUtils.toBean( JSONObject.toJSONString(baseMessage.getData()),UserEntity.class);
                         view.showTask(loginEty);
 
                         }

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/presenter/RealNameAutherPresenter.java

@@ -7,7 +7,7 @@ import com.sheep.gamegroup.exception.ExceptionEngine;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.LoginEntity;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.FastJsonUtils;
 import com.sheep.gamegroup.util.MyDbManager;

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/presenter/SmallSheepPresenter.java

@@ -6,7 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.MoreDataEntity;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.FastJsonUtils;
 import com.sheep.jiuyan.samllsheep.SheepApp;

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

@@ -12,7 +12,7 @@ import android.view.WindowManager;
  * Created by ljy on 2018/3/8.
  */
 public class AppUtil {
-    public static final String BASE_QR = "http://qr.liantu.com/api.php?logo=http://cdngame.kuaifazs.com/icon.png&text=";
+    public static final String BASE_QR = "http://qr.liantu.com/api.php?text=";
 
     public static String getQRLink(String share_link) {
         return BASE_QR + share_link;

+ 3 - 3
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -9,7 +9,7 @@ import com.kfzs.duanduan.ActMain;
 import com.kfzs.duanduan.bean.KFIntentKeys;
 import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.entity.UserEntity;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.WXOnHookAccount;
 import com.sheep.gamegroup.view.activity.AccountAndSecurityAct;
 import com.sheep.gamegroup.view.activity.ActGuideDeblocked;
@@ -354,7 +354,7 @@ public class Jump2View {
      * @param context
      * @param o
      */
-    public void goPersionInfo(Context context, UserInfoEntity o){
+    public void goPersionInfo(Context context, UserEntity o){
         Intent i = new Intent(context, PersionInfoAct.class);
         i.putExtra("info", o);
         context.startActivity(i);
@@ -366,7 +366,7 @@ public class Jump2View {
      * @param context
      * @param o
      */
-    public void goRealNameAuther(Context context, UserInfoEntity o){
+    public void goRealNameAuther(Context context, UserEntity o){
         Intent i = new Intent(context, RealNameAuthenAct.class);
         i.putExtra("info", o);
         context.startActivity(i);

+ 7 - 7
app/src/main/java/com/sheep/gamegroup/view/activity/AccountAndSecurityAct.java

@@ -20,7 +20,7 @@ import com.sheep.gamegroup.event.MoneyChange;
 import com.sheep.gamegroup.event.RealNameAutehrChange;
 import com.sheep.gamegroup.event.UserNameChange;
 import com.sheep.gamegroup.model.entity.UserEntity;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.presenter.AccountAndSecuritContract;
 import com.sheep.gamegroup.presenter.AccountAndSecuritPresenter;
 import com.sheep.gamegroup.util.ActivityManager;
@@ -79,7 +79,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
 
     @Inject
     AccountAndSecuritPresenter presenter;
-    UserInfoEntity mEntity;
+    UserEntity mEntity;
     @BindView(R.id.tv_submit)
     TextView tvSubmit;
 
@@ -118,7 +118,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
 
     @Subscribe(threadMode = ThreadMode.MAIN)
     public void onMessageEvent(UserNameChange done) {
-        UserInfoEntity user=mEntity;
+        UserEntity user=mEntity;
         user.setNickname(done.getNikeName());
         mEntity=user;
         tvName.setText(mEntity.getNickname());
@@ -133,7 +133,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
 
     @Subscribe(threadMode = ThreadMode.MAIN)
     public void onMessageEvent(ImageHeadChange done) {
-        UserInfoEntity user=mEntity;
+        UserEntity user=mEntity;
         user.setAvatar(done.getAvatar());
         mEntity=user;
         Glide.with(AccountAndSecurityAct.this)
@@ -147,7 +147,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
     @Subscribe(threadMode = ThreadMode.MAIN)
     public void onMessageEvent(RealNameAutehrChange done) {
 
-        UserInfoEntity entiy=mEntity;
+        UserEntity entiy=mEntity;
         entiy.setReal_name(done.getRealName());
         entiy.setId_number(done.getIdCard());
         entiy.setBank_card(done.getBanck());
@@ -247,7 +247,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
 
 
     @Override
-    public void showTask(final UserInfoEntity entity) {
+    public void showTask(final UserEntity entity) {
         UserEntity userEntity = null;
         try{
             userEntity = MyDbManager.getInstance()
@@ -309,7 +309,7 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
         }
     }
 
-    private  void  refalshAuther(UserInfoEntity entity ){
+    private  void  refalshAuther(UserEntity entity ){
         boolean isBanck = TextUtils.isEmpty(entity.getBank_card());
         boolean isId_number = TextUtils.isEmpty(entity.getId_number());
         boolean isRoalName = TextUtils.isEmpty(entity.getReal_name());

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

@@ -96,7 +96,7 @@ public class ActMingShengWeb extends BaseCompatActivity {
             @Override
             public void onPageFinished(WebView view, String url) {
                 super.onPageFinished(view, url);
-                injectImgClick4();
+                loadJs();
 //                mWebView.loadUrl("javascript:function convert1() {alert(999)};\n" +
 //                        "function submit(H) {alert(888)};");
             }
@@ -114,7 +114,7 @@ public class ActMingShengWeb extends BaseCompatActivity {
         this.finish();
     }
     // 注入js函数监听
-    public void injectImgClick4() {
+    public void loadJs() {
         mWebView.loadUrl("javascript:var handleResponse = function(){};\n" +
                 "function submit(H) {\n" +
                 "    var C = $(H);\n" +

File diff suppressed because it is too large
+ 389 - 7
app/src/main/java/com/sheep/gamegroup/view/activity/ActZhongXinWeb.java


+ 5 - 26
app/src/main/java/com/sheep/gamegroup/view/activity/AskGetMoneyAct.java

@@ -9,6 +9,8 @@ import android.widget.TextView;
 
 
 import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
+import com.bumptech.glide.request.RequestOptions;
 import com.sheep.gamegroup.absBase.BaseUMActivity;
 import com.sheep.gamegroup.di.components.DaggerAskGetMoneyComponent;
 import com.sheep.gamegroup.di.modules.AskGetMoneyModule;
@@ -33,6 +35,8 @@ import javax.inject.Inject;
 import butterknife.BindView;
 import butterknife.OnClick;
 
+import static com.sheep.gamegroup.view.activity.PersionInfoAct.showQR;
+
 /**
  * Created by Administrator on 2018/3/19.
  */
@@ -108,31 +112,6 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
     }
 
 
-    private void shareToQR() {
-
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        View view = View.inflate(this, R.layout.x_ask_qr_dialog, null);
-        builder.setView(view);
-        final AlertDialog dialog = builder.create();
-//        dialog.getWindow().setDimAmount(0.1f);
-//        dialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));
-        ImageView iv=view.findViewById(R.id.iv_close);
-        ImageView iv_qr=view.findViewById(R.id.iv_qr);
-        Glide.with(this)
-                .load(AppUtil.getQRLink(mEntity.getShare_link(), 800))
-                .into(iv_qr);
-         dialog.show();
-        iv.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                dialog.dismiss();
-            }
-        });
-
-
-    }
-
-
     private void shareToLink() {
         AlertDialog.Builder builder = new AlertDialog.Builder(this);
         View view = View.inflate(this, R.layout.x_ask_reward_dialog, null);
@@ -219,7 +198,7 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
                 shareToQQ();
                 break;
             case R.id.rl_qr:
-                shareToQR();
+                showQR(AskGetMoneyAct.this, mEntity.getShare_link());
                 break;
             case R.id.rl_link:
                 shareToLink();

+ 33 - 14
app/src/main/java/com/sheep/gamegroup/view/activity/PersionInfoAct.java

@@ -1,11 +1,15 @@
 package com.sheep.gamegroup.view.activity;
 
+import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.Intent;
 import android.graphics.Bitmap;
 import android.os.Bundle;
+import android.view.Display;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
 import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
@@ -15,7 +19,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
 import com.bumptech.glide.request.RequestOptions;
 import com.sheep.gamegroup.event.ImageHeadChange;
 import com.sheep.gamegroup.event.UserNameChange;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.util.AppUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.jiuyan.samllsheep.R;
@@ -38,7 +42,7 @@ import butterknife.OnClick;
 
 public class PersionInfoAct extends AbsChooseImageActivity {
 
-    UserInfoEntity mEntity;
+    UserEntity mEntity;
     @BindView(R.id.tv_name)
     TextView tvName;
     @BindView(R.id.tv_nike)
@@ -47,6 +51,8 @@ public class PersionInfoAct extends AbsChooseImageActivity {
     TextView tvSheepId;
     @BindView(R.id.tv_qr)
     ImageView tvQr;
+    @BindView(R.id.tv_qr_small)
+    ImageView tv_qr_small;
     @BindView(R.id.rl_qr)
     RelativeLayout rlQr;
 
@@ -81,7 +87,7 @@ public class PersionInfoAct extends AbsChooseImageActivity {
     public void initData() {
         Intent i = getIntent();
         if (i != null && i.hasExtra("info")) {
-            mEntity = (UserInfoEntity) i.getSerializableExtra("info");
+            mEntity = (UserEntity) i.getSerializableExtra("info");
             if (mEntity != null) {
                 tvNike.setText(mEntity.getNickname());
                 tvSheepId.setText(mEntity.getInvitation_code());
@@ -89,10 +95,10 @@ public class PersionInfoAct extends AbsChooseImageActivity {
                 Glide.with(PersionInfoAct.this)
                         .load(AppUtil.getQRLink(mEntity.getShare_link(), 90))
                         .into(tvQr);
-                Glide.with(this)
-                        .load(AppUtil.getQRLink(mEntity.getShare_link(), 800))
-                        .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
-                        .preload();
+                Glide.with(PersionInfoAct.this)
+                        .load("http://cdngame.kuaifazs.com/icon.png")
+                        .apply(new RequestOptions().override(23))
+                        .into(tv_qr_small);
 
                 Glide.with(PersionInfoAct.this)
                         .load(mEntity.getAvatar())
@@ -108,7 +114,7 @@ public class PersionInfoAct extends AbsChooseImageActivity {
 
     @Subscribe(threadMode = ThreadMode.MAIN)
     public void onMessageEvent(UserNameChange done) {
-        UserInfoEntity user = mEntity;
+        UserEntity user = mEntity;
         user.setNickname(done.getNikeName());
         mEntity = user;
         tvNike.setText(mEntity.getNickname());
@@ -116,17 +122,30 @@ public class PersionInfoAct extends AbsChooseImageActivity {
     }
 
 
-    private void showQR() {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        View view = View.inflate(this, R.layout.x_ask_qr_dialog, null);
+    public static void showQR(Activity activity, String link) {
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        View view = View.inflate(activity, R.layout.x_ask_qr_dialog, null);
         builder.setView(view);
         final AlertDialog dialog = builder.create();
         ImageView iv = view.findViewById(R.id.iv_close);
         ImageView iv_qr = view.findViewById(R.id.iv_qr);
-        Glide.with(PersionInfoAct.this)
-                .load(AppUtil.getQRLink(mEntity.getShare_link(), 800))
+        ImageView iv_qr_small = view.findViewById(R.id.iv_qr_small);
+        Glide.with(activity)
+                .load(AppUtil.getQRLink(link, 800))
+                .apply(new RequestOptions().override(800, 800))
                 .into(iv_qr);
+        Glide.with(activity)
+                .load("http://cdngame.kuaifazs.com/icon.png")
+                .apply(new RequestOptions().override(G.WIDTH/5))
+                .into(iv_qr_small);
         dialog.show();
+        Window window = dialog.getWindow();
+        if(window != null) {
+            android.view.WindowManager.LayoutParams p = window.getAttributes();
+            p.height = G.WIDTH;
+            p.width = G.WIDTH;
+            dialog.getWindow().setAttributes(p);     //设置生效
+        }
         iv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
@@ -175,7 +194,7 @@ public class PersionInfoAct extends AbsChooseImageActivity {
                 startActivity(i);
                 break;
             case R.id.rl_qr:
-                showQR();
+                showQR(PersionInfoAct.this, mEntity.getShare_link());
                 break;
             case R.id.rl_head:
                 showChooseDialog();

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

@@ -18,7 +18,7 @@ import com.sheep.gamegroup.di.modules.PersonalCenterModule;
 import com.sheep.gamegroup.event.UserNameChange;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserEntity;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.presenter.PersonalCenterContract;
 import com.sheep.gamegroup.presenter.PersonalCenterPresenter;
 import com.sheep.gamegroup.util.Jump2View;

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

@@ -14,7 +14,7 @@ import com.sheep.gamegroup.di.components.DaggerRealNameAutherComponent;
 import com.sheep.gamegroup.di.modules.AccountAndSercuritModule;
 import com.sheep.gamegroup.di.modules.RealNameAutherModule;
 import com.sheep.gamegroup.event.RealNameAutehrChange;
-import com.sheep.gamegroup.model.entity.UserInfoEntity;
+import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.presenter.RealNameAutherContract;
 import com.sheep.gamegroup.presenter.RealNameAutherPresenter;
 import com.sheep.gamegroup.util.StringUtils;
@@ -49,7 +49,7 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
     @BindView(R.id.et_name)
     EditText etName;
 
-    UserInfoEntity mEntity;
+    UserEntity mEntity;
     @Inject
     RealNameAutherPresenter  presenter;
 
@@ -81,7 +81,7 @@ public class RealNameAuthenAct extends BaseActivity implements RealNameAutherCon
 
         Intent i = getIntent();
         if (i != null && i.hasExtra("info")) {
-            mEntity = (UserInfoEntity) i.getSerializableExtra("info");
+            mEntity = (UserEntity) i.getSerializableExtra("info");
             if(mEntity!=null) {
 
                 if(!android.text.TextUtils.isEmpty(mEntity.getReal_name())){

+ 15 - 4
app/src/main/res/layout/x_ask_qr_dialog.xml

@@ -1,7 +1,7 @@
 <?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="match_parent"
+    android:layout_height="wrap_content"
     android:background="#ffffff"
     android:orientation="vertical">
 
@@ -13,14 +13,25 @@
         android:layout_gravity="right"
         />
 
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_margin="20dp"
+        android:layout_gravity="center">
      <ImageView
          android:id="@+id/iv_qr"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
-         android:layout_margin="20dp"
-         android:layout_gravity="center"
+         android:layout_centerInParent="true"
+         android:src="@drawable/loading"
+         />
+     <ImageView
+         android:id="@+id/iv_qr_small"
+         android:layout_width="wrap_content"
+         android:layout_height="wrap_content"
+         android:layout_centerInParent="true"
          />
 
-
+    </RelativeLayout>
 
 </LinearLayout>

+ 15 - 3
app/src/main/res/layout/xpersion_info_act_layout.xml

@@ -188,17 +188,29 @@
                 android:id="@+id/tv_more3"
                 />
 
+            <RelativeLayout
+                android:layout_width="30dp"
+                android:layout_height="30dp"
+                android:layout_toLeftOf="@id/tv_more3"
+                android:layout_centerVertical="true">
             <ImageView
                 android:id="@+id/tv_qr"
                 android:layout_width="30dp"
                 android:layout_height="30dp"
                 android:background="@null"
                 android:src="@mipmap/ic_launcher"
-                android:layout_toLeftOf="@id/tv_more3"
-                android:layout_centerVertical="true"
-
+                android:layout_centerInParent="true"
+                />
+            <ImageView
+                android:id="@+id/tv_qr_small"
+                android:layout_width="5dp"
+                android:layout_height="5dp"
+                android:background="@null"
+                android:src="@mipmap/ic_launcher"
+                android:layout_centerInParent="true"
                 />
 
         </RelativeLayout>
+        </RelativeLayout>
     </LinearLayout>
 </LinearLayout>

+ 1 - 1
datashare/build.gradle

@@ -12,7 +12,7 @@ android {
     }
 
     greendao {
-        schemaVersion 4
+        schemaVersion 5
         targetGenDir 'src/main/java'
     }
     buildTypes {

+ 2 - 2
datashare/src/main/java/com/kfzs/duanduan/data/graph/provider/channel/DaoMaster.java

@@ -18,10 +18,10 @@ import com.kfzs.duanduan.datashare.provider.download.DownLoadInfoDao;
 
 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
 /**
- * Master of DAO (schema version 4): knows all DAOs.
+ * Master of DAO (schema version 5): knows all DAOs.
  */
 public class DaoMaster extends AbstractDaoMaster {
-    public static final int SCHEMA_VERSION = 4;
+    public static final int SCHEMA_VERSION = 5;
 
     /** Creates underlying database table using DAOs. */
     public static void createAllTables(Database db, boolean ifNotExists) {