Procházet zdrojové kódy

邀请赚钱界面与接口调通,还差分享

zengjiebin před 7 roky
rodič
revize
98e10906aa

+ 2 - 9
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -207,6 +207,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
         if (pagePresenter != null) {
             initData();
         }
+        //每次进入主页都刷新一下url配置信息
+        CommonUtil.getInstance().initUrlConfigByNet(null, null);
     }
 
 
@@ -259,15 +261,6 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                         }
                         break;
                     case MotionEvent.ACTION_UP:
-                        if (upview1 != null) {
-                            //开始滚动
-                            upview1.startFlipping();
-                        }
-                        if (homepageItemNoticeMv != null) {
-                            //开始滚动
-                            homepageItemNoticeMv.startFlipping();
-                        }
-                        break;
                     default:
                         if (upview1 != null) {
                             //开始滚动

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -712,4 +712,15 @@ public interface ApiService {
      */
     @POST("app/xiaomi/Receive")
     Observable<BaseMessage> receiveXiaomiAccount(@Body JSONObject id);
+
+    /**
+     * 获取邀请用户排名
+     */
+    @GET("app/user/invitation_top")
+    Observable<BaseMessage> getInvitationTop(@Query("top") int top);//top默认为5,可以不传
+    /**
+     * 获取邀请用户进两月礼物发放记录
+     */
+    @GET("app/user/invitation_top_record")
+    Observable<BaseMessage> getInvitationTopRecord();
 }

+ 41 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/AskAward.java

@@ -0,0 +1,41 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/8/7.
+ * realicing@sina.com
+ */
+public class AskAward {
+    private int UserId;
+
+    private String invitation_code;
+
+    private String prize;
+
+    private String nickname;
+
+    public void setUserId(int UserId){
+        this.UserId = UserId;
+    }
+    public int getUserId(){
+        return this.UserId;
+    }
+    public void setInvitation_code(String invitation_code){
+        this.invitation_code = invitation_code;
+    }
+    public String getInvitation_code(){
+        return this.invitation_code;
+    }
+    public void setPrize(String prize){
+        this.prize = prize;
+    }
+    public String getPrize(){
+        return this.prize;
+    }
+    public void setNickname(String nickname){
+        this.nickname = nickname;
+    }
+    public String getNickname(){
+        return this.nickname;
+    }
+
+}

+ 59 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/AskTop.java

@@ -0,0 +1,59 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/8/6.
+ * realicing@sina.com
+ */
+public class AskTop {
+
+    private float sum_amount;
+
+    private int user_id;
+
+    private String invitation_code;
+
+    private int sum_friend;
+
+    private String prize;
+
+    private String nickname;
+
+    public void setSum_amount(float sum_amount){
+        this.sum_amount = sum_amount;
+    }
+    public float getSum_amount(){
+        return this.sum_amount;
+    }
+    public void setUser_id(int user_id){
+        this.user_id = user_id;
+    }
+    public int getUser_id(){
+        return this.user_id;
+    }
+    public void setInvitation_code(String invitation_code){
+        this.invitation_code = invitation_code;
+    }
+    public String getInvitation_code(){
+        return this.invitation_code;
+    }
+    public void setSum_friend(int sum_friend){
+        this.sum_friend = sum_friend;
+    }
+    public int getSum_friend(){
+        return this.sum_friend;
+    }
+    public void setPrize(String prize){
+        this.prize = prize;
+    }
+    public String getPrize(){
+        return this.prize;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+}

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

@@ -317,7 +317,7 @@ public class UserEntity implements Serializable {
         return must_bind_mobile == 0 && TextUtils.isEmpty(mobile);
     }
     //测试服用测试分享链接,正式服用正式的
-    public String getShareLink(){
+    public String getShareLink(){//测试服对应的下载地址为http://10.8.230.17:7776/newsheep?id=32778005
         return TestUtil.isSheep() ? getShare_link() : "http://10.8.210.230:8902/share.html?invitation_code="+getInvitation_code();
     }
 }

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

@@ -857,7 +857,7 @@ public class CommonUtil {
      */
     public void initUrlConfigByNet(final String name, final Action1<String> action1){
         JSONObject url_config = DataUtil.getInstance().getCacheResult(ApiKey.url, JSONObject.class);
-        if(url_config == null) {
+        if(name == null || url_config == null) {
             SheepApp.get(SheepApp.getInstance())
                     .getNetComponent()
                     .getApiService()
@@ -872,6 +872,9 @@ public class CommonUtil {
 
                         @Override
                         public void onNext(BaseMessage baseMessage) {
+                            if(name == null){
+                                return;
+                            }
                             JSONObject urlConfig = baseMessage.getData(JSONObject.class);
                             if(urlConfig == null) {
                                 action1.call(null);

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

@@ -36,7 +36,7 @@ public enum ConnectAddress {
 
         @Override
         public String getAppUrl() {
-            return "http://10.8.220.171:8080/";
+            return "http://10.8.220.171:8081/";
         }
         @Override
         public String getName() {

+ 5 - 2
app/src/main/java/com/sheep/gamegroup/util/ZipChannelUtil.java

@@ -127,11 +127,14 @@ public class ZipChannelUtil {
             }
         }
     }
-
+    private static final boolean GET_TWO = false;
     private static int readShort(RandomAccessFile raf) throws IOException {
         byte[] buffer = new byte[SHORT_LENGTH];
         raf.read(buffer);
-        return buffer[0] + buffer[1]*16*16;//0a00中 0a 10 ,00 0 -> 10+0*256 = 10
+        if(GET_TWO)
+            return buffer[0] + buffer[1]*16*16;//0a00中 0a 10 ,00 0 -> 10+0*256 = 10
+        else
+            return buffer[0];
     }
 
     //判断是否存在渠道号

+ 25 - 21
app/src/main/java/com/sheep/gamegroup/view/activity/ActSheepApkList.java

@@ -87,35 +87,38 @@ public class ActSheepApkList extends BaseActivity {
             }
         return apkInfoList;
     }
+    public static boolean onlyZip = true;
     public static ApkInfo getAppInfo(Context context, File file) {
         ApkInfo apkInfo = new ApkInfo();
         PackageManager packageManager = context.getPackageManager();
         String absolutePath = file.getAbsolutePath();
-        PackageInfo pkgInfo = getPackageInfo(context, absolutePath);
-        if (pkgInfo == null) {
-            return apkInfo;
-        }
-        pkgInfo.applicationInfo.sourceDir = absolutePath;
-        pkgInfo.applicationInfo.publicSourceDir = absolutePath;
-
         AppInfo appInfo = new AppInfo();
-        //程序包名
-        String packageName = pkgInfo.packageName;
-        appInfo.setPackageName(packageName);
-        //获取到图标
-        Drawable icon = pkgInfo.applicationInfo.loadIcon(packageManager);
-        appInfo.setIcon(icon);
-        //获取到应用的名字
-        String appName = pkgInfo.applicationInfo.loadLabel(packageManager).toString();
-        appInfo.setAppName(appName);
+        if(!onlyZip){
+            PackageInfo pkgInfo = getPackageInfo(context, absolutePath);
+            if (pkgInfo == null) {
+                return apkInfo;
+            }
+            pkgInfo.applicationInfo.sourceDir = absolutePath;
+            pkgInfo.applicationInfo.publicSourceDir = absolutePath;
+
+            //程序包名
+            String packageName = pkgInfo.packageName;
+            appInfo.setPackageName(packageName);
+            //获取到图标
+            Drawable icon = pkgInfo.applicationInfo.loadIcon(packageManager);
+            appInfo.setIcon(icon);
+            //获取到应用的名字
+            String appName = pkgInfo.applicationInfo.loadLabel(packageManager).toString();
+            appInfo.setAppName(appName);
+            appInfo.setSha1(SysAppUtil.getSHA1(pkgInfo));
+
+        }
         //获取到安装包的路径
         appInfo.setSourceDir(absolutePath);
         //获取到安装apk的大小
         long apkSize = file.length();
         //格式化apk的大小
-        appInfo.setApkSize(Formatter.formatFileSize(SheepApp.getInstance(),apkSize));
-        appInfo.setSha1(SysAppUtil.getSHA1(pkgInfo));
-
+        appInfo.setApkSize(Formatter.formatFileSize(SheepApp.getInstance(), apkSize));
         apkInfo.setAppInfo(appInfo);
         apkInfo.setFile(file);
         try {
@@ -159,9 +162,10 @@ public class ActSheepApkList extends BaseActivity {
                 if(appInfo == null){
                     return;
                 }
-                app_info_iv.setImageDrawable(appInfo.getIcon());
+                if(appInfo.getIcon() != null)
+                    app_info_iv.setImageDrawable(appInfo.getIcon());
                 ViewUtil.setText(app_info_name_tv, appInfo.getAppName());
-                app_info_name_tv.append(CommonUtil.getFileMD5(item.getFile())+"\n"+item.getComment());
+                app_info_name_tv.append(item.getComment());//CommonUtil.getFileMD5(item.getFile())
                 ViewUtil.setText(app_info_package_name_tv, appInfo.getPackageName());
                 ViewUtil.setText(app_info_size_tv, appInfo.getApkSize());
                 ViewUtil.setText(app_info_path_tv, appInfo.getSourceDir()+"\n"+appInfo.getSha1());

+ 247 - 30
app/src/main/java/com/sheep/gamegroup/view/activity/AskGetMoneyAct.java

@@ -1,9 +1,19 @@
 package com.sheep.gamegroup.view.activity;
 
+import android.app.Activity;
 import android.support.v4.view.ViewPager;
+import android.support.v4.widget.NestedScrollView;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
 import android.util.SparseArray;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
 import android.view.View;
+import android.webkit.WebView;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
+import android.widget.ScrollView;
 import android.widget.TextView;
 
 import com.kfzs.duanduan.fragment.FgtFriendExtractPage;
@@ -11,35 +21,53 @@ import com.kfzs.duanduan.fragment.PagerAdapter;
 import com.sheep.gamegroup.absBase.BaseUMActivity;
 import com.sheep.gamegroup.di.components.DaggerAskGetMoneyComponent;
 import com.sheep.gamegroup.di.modules.AskGetMoneyModule;
+import com.sheep.gamegroup.model.entity.AskAward;
+import com.sheep.gamegroup.model.entity.AskTop;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.BulletinEnty;
 import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.FriendAndAwardEntity;
+import com.sheep.gamegroup.model.entity.TaskEty;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
 import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.entity.XiaomiGameEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.presenter.AskGetMoneyContract;
 import com.sheep.gamegroup.presenter.AskGetMoneyPresenter;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.StringUtils;
+import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
 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 com.sunfusheng.marqueeview.MarqueeView;
 import com.umeng.socialize.ShareAction;
 import com.umeng.socialize.UMShareListener;
 import com.umeng.socialize.bean.SHARE_MEDIA;
 import com.umeng.socialize.media.UMImage;
 import com.umeng.socialize.media.UMWeb;
 
+import java.util.List;
+import java.util.Locale;
+
 import javax.inject.Inject;
 
 import butterknife.BindView;
 import butterknife.OnClick;
+import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
+import rx.schedulers.Schedulers;
 
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.LINK_SHARE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.QR_COPY;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.SHARE_TO_QQ;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.SHARE_TO_WX;
+import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
 
 /**
  * Created by Administrator on 2018/3/19.
@@ -72,6 +100,20 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
     TextView friend_extract_last_page_tv;
     @BindView(R.id.friend_extract_next_page_tv)
     TextView friend_extract_next_page_tv;
+    @BindView(R.id.ask_bg)
+    WebView ask_bg;
+    @BindView(R.id.ask_top_1)
+    View ask_top_1;
+    @BindView(R.id.ask_top_2)
+    View ask_top_2;
+    @BindView(R.id.ask_top5_not_you)
+    TextView ask_top5_not_you;
+    @BindView(R.id.ask_top5_list)
+    RecyclerView ask_top5_list;
+    @BindView(R.id.ask_award_info)
+    MarqueeView ask_award_info;
+    @BindView(R.id.ask_scroll_view)
+    NestedScrollView scrollView;
 
     private FriendAndAwardEntity mEntity;
 
@@ -80,23 +122,135 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
         return R.layout.x_ask_getmoney_act_layout;
     }
 
+    private Activity activity;
+
     @Override
     public void initView() {
+        activity = this;
         TitleBarUtils.getInstance()
-                .setTitle(this,"邀请赚钱")
+                .setTitle(this, "邀请赚钱")
                 .setTitleFinish(this);
         DaggerAskGetMoneyComponent.builder().askGetMoneyModule(new AskGetMoneyModule(this))
                 .netComponent(SheepApp.get(this).getNetComponent())
                 .build()
                 .inject(this);
         initFriendExtractList();
+        initAskTop5View();
+        String content = "<!DOCTYPEhtml>\n" +
+                "<html>\n" +
+                "  <head>\n" +
+                "    <title>HTML字符串</title>\n" +
+                "    <metahttp-equivmetahttp-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n" +
+                "    <meta name=\"viewport\" content=\"width="+G.WIDTH+", user-scalable=no\">\n" +
+                "    <style type=\"text/css\">\n" +
+                "      body {\n" +
+                "        margin: 0;\n" +
+                "        padding: 0;\n" +
+                "      }\n" +
+                "      img {\n" +
+                "        padding: 0;\n" +
+                "        margin: 0;\n" +
+                "      }\n" +
+                "    </style>\n" +
+                "  </head>\n" +
+                "  <body>\n" +
+                "    <img src=\"http://cdngame.kuaifazs.com/ask_bg.png\" width=\"100%\">\n" +
+                "  </body>\n" +
+                "</html>";
+        ask_bg.getSettings().setDefaultTextEncodingName("UTF-8") ;
+        ask_bg.loadData(content, "text/html", "UTF-8") ;
+//                16,18,19
+        LinearLayout.LayoutParams layoutParams1 = (LinearLayout.LayoutParams) ask_top_1.getLayoutParams();
+        layoutParams1.height = G.WIDTH * 16 / 18;
+        ask_top_1.setLayoutParams(layoutParams1);
+        LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) ask_top_2.getLayoutParams();
+        layoutParams2.height = G.WIDTH * 3 / 18;
+        ask_top_2.setLayoutParams(layoutParams2);
+    }
+
+    private List<AskTop> list = ListUtil.emptyList();
+    private AdbCommonRecycler<AskTop> adapter;
+
+    private void initAskTop5View() {
+        list.add(null);
+        ask_top5_list.setLayoutManager(new LinearLayoutManager(activity));
+        //ask_top5_list 解决滑动不流畅问题
+        ask_top5_list.setHasFixedSize(true);
+        ask_top5_list.setNestedScrollingEnabled(false);
+        adapter = new AdbCommonRecycler<AskTop>(activity, list) {
+
+            @Override
+            public int getItemViewType(int position) {
+                return position;
+            }
+
+            @Override
+            public int getViewIdByType(int type) {
+                switch (type) {
+                    case 0:
+                        return R.layout.x_ask_top5_title;
+                    default:
+                        return R.layout.x_ask_top5_item;
+                }
+            }
+
+            @Override
+            public void convert(ViewHolder holder, final AskTop item) {
+                View itemView = holder.itemView;
+                if (item == null)
+                    return;
+                TextView x_ask_top5_item_user = itemView.findViewById(R.id.x_ask_top5_item_user);
+                TextView x_ask_top5_item_money = itemView.findViewById(R.id.x_ask_top5_item_money);
+                TextView x_ask_top5_item_award = itemView.findViewById(R.id.x_ask_top5_item_award);
+                ViewUtil.setText(x_ask_top5_item_user, String.format(Locale.CHINA, "昵称\n%s\n邀请人数:%d", item.getNickname(), item.getSum_friend()));
+                ViewUtil.setText(x_ask_top5_item_money, String.format(Locale.CHINA, "%.0f", item.getSum_amount()));
+                ViewUtil.setText(x_ask_top5_item_award, item.getPrize());
+                ImageView ask_top5_item_iv = itemView.findViewById(R.id.ask_top5_item_iv);
+                switch (holder.getAdapterPosition()){
+                    case 1:
+                        ask_top5_item_iv.setImageResource(R.mipmap.ask_top_1);
+                        break;
+                    case 2:
+                        ask_top5_item_iv.setImageResource(R.mipmap.ask_top_2);
+                        break;
+                    case 3:
+                        ask_top5_item_iv.setImageResource(R.mipmap.ask_top_3);
+                        break;
+                }
+
+
+            }
+        };
+        ask_top5_list.setAdapter(adapter);
     }
 
     @Override
     public void initListener() {
-
+        scrollView.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                switch (event.getAction()) {
+                    case MotionEvent.ACTION_DOWN:
+                        if (ask_award_info != null) {
+                            //开始滚动
+                            ask_award_info.stopFlipping();
+                        }
+                        break;
+                    case MotionEvent.ACTION_UP:
+                    default:
+                        if (ask_award_info != null) {
+                            //开始滚动
+                            ask_award_info.startFlipping();
+                        }
+                        break;
+                }
+                return false;
+            }
+        });
     }
+
     private UserEntity userEntity;
+
     @Override
     public void initData() {
         showProgress();
@@ -104,10 +258,57 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
         CommonUtil.getInstance().updateUserInfo(new Action1<UserEntity>() {
             @Override
             public void call(UserEntity result) {
-                if(result != null)
+                if (result != null)
                     userEntity = result;
             }
         });
+        initAskTop5();
+    }
+
+    private void initAskTop5() {
+        SheepApp.getInstance().getNetComponent().getApiService().getInvitationTop(5)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<AskTop> newList = baseMessage.getDataList(AskTop.class);
+                        if(ListUtil.isEmpty(newList)){
+                            return;
+                        }
+                        if(BuildConfig.DEBUG) {
+                            while (newList.size() < 5){
+                                newList.add(newList.get(0));
+                            }
+                        }
+                        list.addAll(newList);
+                        adapter.notifyDataSetChanged();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+
+                    }
+                });
+        SheepApp.getInstance().getNetComponent().getApiService().getInvitationTopRecord()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<AskAward> newList = baseMessage.getDataList(AskAward.class);
+                        for (AskAward item : newList) {
+                            TextView moreView = (TextView) LayoutInflater.from(activity).inflate(R.layout.x_ask_award_item, null);
+                            moreView.setText(String.format(Locale.CHINA, "%s领取了%s", item.getNickname(), item.getPrize()));
+                            ask_award_info.addView(moreView);
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+
+                    }
+                });
     }
 
     private void shareToWX() {
@@ -119,42 +320,40 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
     }
 
     private void shareToOther(int code) {
-        if(userEntity == null){
+        if (userEntity == null) {
             G.showToast("数据正在加载中");
             return;
         }
         ShareAction shareAction = new ShareAction(AskGetMoneyAct.this);
         if (code == 1) {
             shareAction.setPlatform(SHARE_MEDIA.WEIXIN);
-            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "wx",mEntity.getShare_desc());
+            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "wx", mEntity.getShare_desc());
         } else {
             shareAction.setPlatform(SHARE_MEDIA.QQ);
-            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "qq",mEntity.getShare_desc());
+            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "qq", mEntity.getShare_desc());
         }
     }
 
 
     private void shareToLink() {
-        if(userEntity == null){
+        if (userEntity == null) {
             G.showToast("数据正在加载中");
             return;
         }
         LINK_SHARE.onEvent();
         ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("分享链接").setMsg(userEntity.getShareLink())
-            .setMsgMore("通过连接加入小绵羊即可成为你的好友").setMsgMoreColor(R.color.txt_black_9e9c9c)
-            .setBtnLeftText("复制链接").setBtnLeftOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            QR_COPY.onEvent();
-                            StringUtils.CopyText(userEntity.getShareLink());
-                            G.showToast("复制链接成功");
-                        }
-                    }));
+                .setMsgMore("通过连接加入小绵羊即可成为你的好友").setMsgMoreColor(R.color.txt_black_9e9c9c)
+                .setBtnLeftText("复制链接").setBtnLeftOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        QR_COPY.onEvent();
+                        StringUtils.CopyText(userEntity.getShareLink());
+                        G.showToast("复制链接成功");
+                    }
+                }));
     }
 
 
-
-
     @Override
     public void onStart(SHARE_MEDIA share_media) {
 
@@ -190,11 +389,11 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
     @Override
     public void showTask(FriendAndAwardEntity entity) {
         hideProgress();
-        mEntity=entity;
+        mEntity = entity;
         this.runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                tvSize.setText(mEntity.getFriend_count()+"");
+                tvSize.setText(mEntity.getFriend_count() + "");
                 tvMoney.setText(mEntity.getAward());
             }
         });
@@ -215,7 +414,7 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
                     SHARE_TO_QQ.onEvent();
                     break;
                 case R.id.rl_qr:
-                    if(userEntity == null){
+                    if (userEntity == null) {
                         G.showToast("数据正在加载中");
                         break;
                     }
@@ -229,15 +428,18 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
             G.showToast(R.string.loading_data);
         }
     }
+
     private SparseArray<FgtFriendExtractPage> mTestFragments;
-    public void setFriendExtractCount(int count, int page, int size){
+
+    public void setFriendExtractCount(int count, int page, int size) {
         friend_extract_count_tv.setText(getString(R.string.friend_extract_count, count));
         checkAddPage(page, size);
     }
+
     private void checkAddPage(int page, int size) {
-        if(curPage+2 > page && size == FgtFriendExtractPage.per_page){//已经到最后一页面,且数据是满的,可以添加一页面
+        if (curPage + 2 > page && size == FgtFriendExtractPage.per_page) {//已经到最后一页面,且数据是满的,可以添加一页面
             int nextPage = page + 1;
-            if(mTestFragments.get(nextPage) == null) {
+            if (mTestFragments.get(nextPage) == null) {
 //                if(BuildConfig.DEBUG) G.showToast("添加新的一页:" + nextPage);
                 mTestFragments.put(nextPage, FgtFriendExtractPage.newInstance(nextPage));
                 mPagerAdapter.notifyDataSetChanged();
@@ -245,14 +447,15 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
 //                if(BuildConfig.DEBUG) G.showToast("不用添加新的一页:" + nextPage);
             }
         }
-        if(size > FgtFriendExtractPage.per_page){
-            if(BuildConfig.DEBUG) G.showToast("页面" + page+"的数据为:"+size);
+        if (size > FgtFriendExtractPage.per_page) {
+            if (BuildConfig.DEBUG) G.showToast("页面" + page + "的数据为:" + size);
         }
     }
 
     private int curPage = 1;
     private PagerAdapter mPagerAdapter;
-    private void initFriendExtractList(){
+
+    private void initFriendExtractList() {
         mTestFragments = new SparseArray<>();
         mTestFragments.put(1, FgtFriendExtractPage.newInstance(1));
         mPagerAdapter = new PagerAdapter(getSupportFragmentManager(), mTestFragments);
@@ -265,9 +468,9 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
 
             @Override
             public void onPageSelected(int i) {
-                curPage = i+1;
-                friend_extract_page_tv.setText(""+curPage);
-                checkAddPage(curPage,mTestFragments.get(curPage).getList().size());
+                curPage = i + 1;
+                friend_extract_page_tv.setText("" + curPage);
+                checkAddPage(curPage, mTestFragments.get(curPage).getList().size());
             }
 
             @Override
@@ -288,4 +491,18 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
             }
         });
     }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+
+        if (ask_award_info != null) {
+            //停止滚动
+            ask_award_info.stopFlipping();
+        }
+    }
+    //显示分享对话框
+    public void showShareView(View view) {
+
+    }
 }

+ 8 - 0
app/src/main/res/layout/x_ask_award_item.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:ellipsize="marquee"
+    android:text="发放情况:"
+    android:textColor="#ff333333"
+    android:textSize="12sp" />

+ 391 - 488
app/src/main/res/layout/x_ask_getmoney_act_layout.xml

@@ -1,574 +1,477 @@
 <?xml version="1.0" encoding="utf-8"?>
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout 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"
-    android:orientation="vertical"
-    android:background="@color/white_light"
-    android:scrollbars="none"
-    >
+    xmlns:tools="http://schemas.android.com/tools"
+    tools:context="com.sheep.gamegroup.view.activity.AskGetMoneyAct">
 
-    <LinearLayout
+
+    <include layout="@layout/title" />
+
+    <android.support.v4.widget.NestedScrollView
+        android:id="@+id/ask_scroll_view"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:background="@color/bg_gray"
-        android:baselineAligned="false"
-        android:descendantFocusability="beforeDescendants"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:orientation="vertical">
+        android:layout_marginBottom="@dimen/content_padding_10"
+        android:layout_marginTop="?attr/actionBarSize"
+        android:orientation="vertical"
+        android:scrollbars="none">
 
-
-        <include layout="@layout/title" />
-        <LinearLayout
+        <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-            android:layout_margin="@dimen/content_padding_10"
-            android:orientation="vertical"
-            >
+            android:layout_height="match_parent">
+
+            <WebView
+                android:id="@+id/ask_bg"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent" />
 
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="70dp"
-                android:orientation="horizontal"
-                >
+                android:layout_height="match_parent"
+                android:baselineAligned="false"
+                android:descendantFocusability="beforeDescendants"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:orientation="vertical">
 
-                <RelativeLayout
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    >
 
-                    <LinearLayout
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:orientation="horizontal"
-                        android:layout_alignParentBottom="true"
-                        android:layout_centerHorizontal="true"
-                        android:id="@+id/ll_share"
-                        >
+                <View
+                    android:id="@+id/ask_top_1"
+                    android:layout_width="match_parent"
+                    android:layout_height="320dp" />
+
+                <LinearLayout
+                    android:id="@+id/ask_top_2"
+                    android:layout_width="match_parent"
+                    android:layout_height="60dp"
+                    android:orientation="horizontal">
+
+                    <RelativeLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1">
+
                         <TextView
+
+                            android:id="@+id/tv_size"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="1"
-                            android:textSize="10dp"
-                            android:background="@drawable/x_tv_round_bg"
-                            android:gravity="center"
-                            android:layout_gravity="center"
-                            />
+                            android:layout_centerHorizontal="true"
+                            android:text="@string/app_name"
+                            android:textColor="#ffffff"
+                            android:textSize="24sp"
+                            android:textStyle="bold" />
 
                         <TextView
-                            android:layout_marginLeft="3dp"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/ask_friend"
-                            android:layout_gravity="center"
-                            />
-                        <ImageView
-                            android:layout_width="10dp"
-                            android:layout_height="10dp"
-                            android:background="@null"
-                            android:src="@mipmap/x_ic_next"
-                            android:layout_marginLeft="10dp"
-                            android:layout_gravity="center"
-                            />
-                    </LinearLayout>
-                    <ImageView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:background="@null"
-                        android:src="@mipmap/x_ic_share"
-                        android:layout_marginBottom="5dp"
-                        android:layout_centerHorizontal="true"
-                        android:layout_above="@id/ll_share"
-                        />
+                            android:layout_below="@id/tv_size"
+                            android:layout_centerHorizontal="true"
+                            android:text="@string/friend"
+                            android:textColor="#ffffff"
+                            android:textSize="13sp" />
+
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:orientation="vertical">
+
+                        <LinearLayout
+                            android:id="@+id/tv_money_ll"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_centerHorizontal="true"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="¥"
+                                android:textColor="#FCFF00"
+                                android:textSize="12sp" />
+
+                            <TextView
+                                android:id="@+id/tv_money"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:textColor="#FCFF00"
+                                android:textSize="24sp"
+                                android:textStyle="bold" />
+                        </LinearLayout>
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@id/tv_money_ll"
+                            android:layout_centerHorizontal="true"
+                            android:text="@string/reward"
+                            android:textColor="#ffffff"
+                            android:textSize="13sp" />
 
+                    </RelativeLayout>
 
-                </RelativeLayout>
 
+                </LinearLayout>
 
-                <RelativeLayout
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    >
+                <!--本月排行榜top5-->
+                <android.support.constraint.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="@dimen/content_padding_10"
+                    android:layout_marginStart="@dimen/content_padding_10"
+                    android:layout_marginTop="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:padding="@dimen/content_padding_10">
 
-                    <LinearLayout
+                    <TextView
+                        android:id="@+id/ask_top5_title"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:orientation="horizontal"
-                        android:layout_alignParentBottom="true"
-                        android:layout_centerHorizontal="true"
-                        android:id="@+id/ll_task"
-                        >
+                        android:text="本月排行榜top5"
+                        android:textColor="#4889FF"
+                        android:textSize="14sp"
+                        app:layout_constraintTop_toTopOf="parent" />
 
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="2"
-                            android:textSize="10dp"
-                            android:background="@drawable/x_tv_round_bg"
-                            android:gravity="center"
-                            android:layout_gravity="center"
-                            />
-                        <TextView
-                            android:layout_marginLeft="3dp"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:text="@string/friend_to_task"
-                            android:layout_gravity="center"
-                            />
-                        <ImageView
-                            android:layout_width="10dp"
-                            android:layout_height="10dp"
-                            android:background="@null"
-                            android:src="@mipmap/x_ic_next"
-                            android:layout_marginLeft="10dp"
-                            android:layout_gravity="center"
-                            />
-                    </LinearLayout>
-                    <ImageView
+                    <TextView
+                        android:id="@+id/ask_top5_not_you"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:background="@null"
-                        android:layout_marginBottom="5dp"
-                        android:src="@mipmap/x_ic_task"
-                        android:layout_centerHorizontal="true"
-                        android:layout_above="@id/ll_task"
-                        />
+                        android:gravity="center"
+                        android:text="你还未上榜,再接再厉"
+                        android:textColor="#999999"
+                        android:textSize="10sp"
+                        app:layout_constraintBottom_toBottomOf="@+id/ask_top5_title"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <android.support.v7.widget.RecyclerView
+                        android:id="@+id/ask_top5_list"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="10dp"
+                        app:layout_constraintTop_toBottomOf="@+id/ask_top5_title" />
 
+                </android.support.constraint.ConstraintLayout>
 
-                </RelativeLayout>
+                <LinearLayout
+                    android:id="@+id/homepage_item_notice_layout"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="@dimen/content_padding_10"
+                    android:layout_marginStart="@dimen/content_padding_10"
+                    android:layout_marginTop="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="horizontal"
+                    android:padding="@dimen/content_padding_10">
 
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="发放情况:"
+                        android:textColor="#ff333333"
+                        android:textSize="12sp" />
+
+                    <com.sunfusheng.marqueeview.MarqueeView
+                        android:id="@+id/ask_award_info"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:textColor="#ff333333"
+                        android:textSize="12sp"
+                        app:mvAnimDuration="1000"
+                        app:mvDirection="right_to_left"
+                        app:mvInterval="3000"
+                        app:mvSingleLine="true" />
+                </LinearLayout>
+                <!--已邀请好友列表-->
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="@dimen/content_padding_10"
+                    android:layout_marginStart="@dimen/content_padding_10"
+                    android:layout_marginTop="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="vertical"
+                    android:paddingBottom="@dimen/content_padding_10"
+                    android:paddingTop="@dimen/content_padding_10">
+
+                    <TextView
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginBottom="@dimen/content_padding_10"
+                        android:layout_marginStart="9dp"
+                        android:text="已邀请好友列表"
+                        android:textColor="#191919"
+                        android:textSize="@dimen/text_size_15" />
+
+                    <include layout="@layout/x_ask_getmoney_act_layout_include" />
+
+                    <com.kfzs.duanduan.view.ViewPagerPlus
+                        android:id="@+id/friend_extract_vp"
+                        android:layout_width="match_parent"
+                        android:layout_height="130dp"
+                        android:layout_marginTop="@dimen/content_padding_10" />
 
-                <RelativeLayout
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    >
                     <LinearLayout
-                        android:layout_width="wrap_content"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:orientation="horizontal"
-                        android:layout_alignParentBottom="true"
-                        android:layout_centerHorizontal="true"
-                        android:id="@+id/ll_reward"
-                        >
+                        android:layout_marginTop="@dimen/content_padding_10"
+                        android:gravity="center"
+                        android:orientation="horizontal">
+
                         <TextView
+                            android:id="@+id/friend_extract_count_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="3"
-                            android:textSize="10dp"
-                            android:background="@drawable/x_tv_round_bg"
-                            android:gravity="center"
-                            android:layout_gravity="center"
-                            />
+                            android:text="共0条"
+                            android:textColor="#a3282828"
+                            android:textSize="11sp" />
 
                         <TextView
-                            android:layout_marginLeft="3dp"
+                            android:id="@+id/friend_extract_last_page_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:text="@string/my_getreward"
-                            android:layout_gravity="center"
-                            />
+                            android:layout_marginStart="@dimen/content_padding_20"
+                            android:background="@drawable/shape_page"
+                            android:paddingBottom="2dp"
+                            android:paddingEnd="17dp"
+                            android:paddingStart="17dp"
+                            android:paddingTop="2dp"
+                            android:text="@string/last_page"
+                            android:textColor="#282828"
+                            android:textSize="12sp" />
 
-                        <ImageView
+                        <TextView
+                            android:id="@+id/friend_extract_page_tv"
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_marginLeft="10dp"
-                            android:layout_gravity="center"
-                            />
-                    </LinearLayout>
-                    <ImageView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:background="@null"
-                        android:layout_marginBottom="5dp"
-                        android:src="@mipmap/x_ic_reward"
-                        android:layout_centerHorizontal="true"
-                        android:layout_above="@id/ll_reward"
-                        />
-
-
-                </RelativeLayout>
-
-
-            </LinearLayout>
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                style="@style/hint_txt_style"
-                android:layout_gravity="center_horizontal"
-                android:text="@string/ask_task_hint"
-                android:layout_marginBottom="15dp"
-                android:layout_marginTop="15dp"
-                />
-        </LinearLayout>
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="100dp"
-            android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-            android:layout_marginLeft="@dimen/content_padding_10"
-            android:layout_marginRight="@dimen/content_padding_10"
-            android:orientation="horizontal"
-            >
-            <RelativeLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                >
+                            android:layout_marginStart="@dimen/content_padding_10"
+                            android:background="@drawable/shape_page"
+                            android:paddingBottom="2dp"
+                            android:paddingEnd="7dp"
+                            android:paddingStart="7dp"
+                            android:paddingTop="2dp"
+                            android:text="1"
+                            android:textColor="#282828"
+                            android:textSize="12sp" />
 
-                <TextView
+                        <TextView
+                            android:id="@+id/friend_extract_next_page_tv"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="@dimen/content_padding_10"
+                            android:background="@drawable/shape_page"
+                            android:paddingBottom="2dp"
+                            android:paddingEnd="17dp"
+                            android:paddingStart="17dp"
+                            android:paddingTop="2dp"
+                            android:text="@string/next_page"
+                            android:textColor="#282828"
+                            android:textSize="12sp" />
+                    </LinearLayout>
+                </LinearLayout>
 
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textSize="@dimen/text_size_25"
-                    android:textColor="@color/black_444444"
-                    android:id="@+id/tv_size"
-                    android:layout_centerInParent="true"
-                    android:textStyle="bold"
-                    />
-
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textSize="13sp"
-                    android:textColor="#5b5b5b"
-                    android:text="@string/friend"
-                    android:layout_below="@id/tv_size"
-                    android:layout_centerHorizontal="true"
-                    android:layout_marginTop="8dp"
-                    />
-
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:orientation="vertical"
-                >
+                <!--好友邀请-->
 
                 <LinearLayout
-                    android:id="@+id/tv_money_ll"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_centerInParent="true"
-                    android:orientation="horizontal">
+                    android:visibility="gone"
+                    android:layout_margin="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="vertical"
+                    android:padding="15dp">
+
                     <TextView
-                        android:id="@+id/tv_money"
+                        style="@style/txt_style_15"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:textSize="24sp"
-                        android:textColor="@color/txt_red_ff4a5f"
-                        android:textStyle="bold"
-                        />
-                    <TextView
-                        android:layout_width="wrap_content"
+                        android:layout_marginBottom="10dp"
+                        android:text="好友邀请" />
+
+                    <RelativeLayout
+                        android:id="@+id/rl_wx"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:textSize="12sp"
-                        android:textColor="@color/txt_red_ff4a5f"
-                        android:textStyle="bold"
-                        android:text="元"
-                        />
-                </LinearLayout>
+                        android:layout_marginBottom="10dp"
+                        android:layout_marginTop="10dp">
 
-                <TextView
-                    android:layout_centerHorizontal="true"
-                    android:layout_below="@id/tv_money_ll"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textSize="13sp"
-                    android:textColor="#5b5b5b"
-                    android:text="@string/reward"
-                    android:layout_marginTop="8dp"
+                        <ImageView
+                            android:id="@+id/iv_wx"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_alignParentStart="true"
+                            android:layout_marginEnd="@dimen/content_padding_10"
+                            android:background="@null"
+                            android:src="@mipmap/x_ic_wx" />
 
-                    />
+                        <TextView
+                            android:id="@+id/tv_wx"
+                            style="@style/txt_style_15"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_toRightOf="@id/iv_wx"
+                            android:text="@string/wx_friend" />
 
-            </RelativeLayout>
+                        <TextView
+                            style="@style/hint_txt_style"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@id/tv_wx"
+                            android:layout_marginTop="3dp"
+                            android:layout_toRightOf="@id/iv_wx"
+                            android:text="@string/wx_friend_content" />
 
+                    </RelativeLayout>
 
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1px"
+                        android:background="@color/white_bg_line" />
 
 
+                    <RelativeLayout
+                        android:id="@+id/rl_qq"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginBottom="10dp"
+                        android:layout_marginTop="10dp">
 
-        </LinearLayout>
+                        <ImageView
+                            android:id="@+id/iv_qq"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_alignParentStart="true"
+                            android:layout_marginEnd="@dimen/content_padding_10"
+                            android:background="@null"
+                            android:src="@mipmap/x_ic_qq"
 
+                            />
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-            android:layout_marginTop="@dimen/content_padding_10"
-            android:layout_marginStart="@dimen/content_padding_10"
-            android:layout_marginEnd="@dimen/content_padding_10"
-            android:paddingTop="@dimen/content_padding_10"
-            android:paddingBottom="@dimen/content_padding_10"
-            android:orientation="vertical">
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginStart="9dp"
-                android:layout_marginBottom="@dimen/content_padding_10"
-                android:textSize="@dimen/text_size_15"
-                android:textColor="#191919"
-                android:text="已邀请好友列表"/>
-            <include layout="@layout/x_ask_getmoney_act_layout_include"/>
-            <com.kfzs.duanduan.view.ViewPagerPlus
-                android:id="@+id/friend_extract_vp"
-                android:layout_width="match_parent"
-                android:layout_marginTop="@dimen/content_padding_10"
-                android:layout_height="130dp"/>
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/content_padding_10"
-                android:gravity="center"
-                android:orientation="horizontal">
-                <TextView
-                    android:id="@+id/friend_extract_count_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textSize="11sp"
-                    android:textColor="#a3282828"
-                    android:text="共0条"/>
+                        <TextView
+                            android:id="@+id/tv_qq"
+                            style="@style/txt_style_15"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_toEndOf="@id/iv_qq"
+                            android:text="@string/qq_friend" />
 
-                <TextView
-                    android:id="@+id/friend_extract_last_page_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/content_padding_20"
-                    android:background="@drawable/shape_page"
-                    android:paddingStart="17dp"
-                    android:paddingEnd="17dp"
-                    android:paddingTop="2dp"
-                    android:paddingBottom="2dp"
-                    android:textSize="12sp"
-                    android:textColor="#282828"
-                    android:text="@string/last_page"/>
-                <TextView
-                    android:id="@+id/friend_extract_page_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/content_padding_10"
-                    android:background="@drawable/shape_page"
-                    android:paddingStart="7dp"
-                    android:paddingEnd="7dp"
-                    android:paddingTop="2dp"
-                    android:paddingBottom="2dp"
-                    android:textSize="12sp"
-                    android:textColor="#282828"
-                    android:text="1"/>
-
-                <TextView
-                    android:id="@+id/friend_extract_next_page_tv"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginStart="@dimen/content_padding_10"
-                    android:background="@drawable/shape_page"
-                    android:paddingStart="17dp"
-                    android:paddingEnd="17dp"
-                    android:paddingTop="2dp"
-                    android:paddingBottom="2dp"
-                    android:textSize="12sp"
-                    android:textColor="#282828"
-                    android:text="@string/next_page"/>
-            </LinearLayout>
-        </LinearLayout>
+                        <TextView
+                            style="@style/hint_txt_style"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@id/tv_qq"
+                            android:layout_marginTop="3dp"
+                            android:layout_toEndOf="@id/iv_qq"
+                            android:text="@string/qq_friend_content" />
 
+                    </RelativeLayout>
 
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
-            android:layout_margin="@dimen/content_padding_10"
-            android:orientation="vertical"
-            android:padding="15dp"
-            >
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="好友邀请"
-                style="@style/txt_style_15"
-                android:layout_marginBottom="10dp"
-                />
-            <RelativeLayout
-                android:id="@+id/rl_wx"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                >
-                <ImageView
-                    android:id="@+id/iv_wx"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:background="@null"
-                    android:src="@mipmap/x_ic_wx"
-                    android:layout_alignParentStart="true"
-                    android:layout_marginEnd="@dimen/content_padding_10"
-                    />
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1px"
+                        android:background="@color/white_bg_line" />
 
-                <TextView
-                    android:id="@+id/tv_wx"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/wx_friend"
-                    android:layout_toRightOf="@id/iv_wx"
-                    style="@style/txt_style_15"
-                    />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/wx_friend_content"
-                    android:layout_toRightOf="@id/iv_wx"
-                    android:layout_below="@id/tv_wx"
-                    android:layout_marginTop="3dp"
-                    style="@style/hint_txt_style"
-                    />
-
-            </RelativeLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/white_bg_line"
-                />
-
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:id="@+id/rl_qq"
-                >
-                <ImageView
-                    android:id="@+id/iv_qq"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:background="@null"
-                    android:src="@mipmap/x_ic_qq"
-                    android:layout_alignParentStart="true"
-                    android:layout_marginEnd="@dimen/content_padding_10"
+                    <RelativeLayout
+                        android:id="@+id/rl_qr"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginBottom="10dp"
+                        android:layout_marginTop="10dp">
 
-                    />
+                        <ImageView
+                            android:id="@+id/iv_qr"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_alignParentStart="true"
+                            android:layout_marginEnd="@dimen/content_padding_10"
+                            android:background="@null"
+                            android:src="@mipmap/x_ic_qr"
 
-                <TextView
-                    android:id="@+id/tv_qq"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/qq_friend"
-                    android:layout_toEndOf="@id/iv_qq"
-                    style="@style/txt_style_15"
-                    />
+                            />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/qq_friend_content"
-                    android:layout_toEndOf="@id/iv_qq"
-                    android:layout_below="@id/tv_qq"
-                    android:layout_marginTop="3dp"
-                    style="@style/hint_txt_style"
-                    />
-
-            </RelativeLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/white_bg_line"
-                />
+                        <TextView
+                            android:id="@+id/tv_qr"
+                            style="@style/txt_style_15"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_toEndOf="@id/iv_qr"
+                            android:text="@string/share_qr_code" />
 
+                        <TextView
+                            style="@style/hint_txt_style"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@id/tv_qr"
+                            android:layout_marginTop="3dp"
+                            android:layout_toEndOf="@id/iv_qr"
+                            android:text="@string/share_qr_code_content" />
 
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:id="@+id/rl_qr"
-                >
-                <ImageView
-                    android:id="@+id/iv_qr"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:background="@null"
-                    android:src="@mipmap/x_ic_qr"
-                    android:layout_alignParentStart="true"
-                    android:layout_marginEnd="@dimen/content_padding_10"
+                    </RelativeLayout>
 
-                    />
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1px"
+                        android:background="@color/white_bg_line" />
 
-                <TextView
-                    android:id="@+id/tv_qr"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/share_qr_code"
-                    android:layout_toEndOf="@id/iv_qr"
-                    style="@style/txt_style_15"
-                    />
 
-                <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/share_qr_code_content"
-                    android:layout_toEndOf="@id/iv_qr"
-                    android:layout_below="@id/tv_qr"
-                    android:layout_marginTop="3dp"
-                    style="@style/hint_txt_style"
-                    />
-
-            </RelativeLayout>
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/white_bg_line"
-                />
+                    <RelativeLayout
+                        android:id="@+id/rl_link"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginBottom="10dp"
+                        android:layout_marginTop="10dp">
 
+                        <ImageView
+                            android:id="@+id/iv_link"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_alignParentStart="true"
+                            android:layout_marginEnd="@dimen/content_padding_10"
+                            android:background="@null"
+                            android:src="@mipmap/x_ic_link"
 
+                            />
 
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:layout_marginBottom="10dp"
-                android:id="@+id/rl_link"
-                >
-                <ImageView
-                    android:id="@+id/iv_link"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:background="@null"
-                    android:src="@mipmap/x_ic_link"
-                    android:layout_alignParentStart="true"
-                    android:layout_marginEnd="@dimen/content_padding_10"
+                        <TextView
+                            android:id="@+id/tv_link"
+                            style="@style/txt_style_15"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_toEndOf="@id/iv_link"
+                            android:text="@string/share_link" />
 
-                    />
+                        <TextView
+                            android:id="@+id/tv_link_content"
+                            style="@style/hint_txt_style"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@id/tv_link"
+                            android:layout_marginTop="3dp"
+                            android:layout_toEndOf="@id/iv_link"
+                            android:text="@string/share_link_content" />
 
-                <TextView
-                    android:id="@+id/tv_link"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/share_link"
-                    android:layout_toEndOf="@id/iv_link"
-                    style="@style/txt_style_15"
-                    />
-
-                <TextView
-                    android:id="@+id/tv_link_content"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/share_link_content"
-                    android:layout_toEndOf="@id/iv_link"
-                    android:layout_below="@id/tv_link"
-                    android:layout_marginTop="3dp"
-                    style="@style/hint_txt_style"
-                    />
+                    </RelativeLayout>
 
-            </RelativeLayout>
+                </LinearLayout>
+            </LinearLayout>
+        </RelativeLayout>
+    </android.support.v4.widget.NestedScrollView>
 
-        </LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:background="#ffffff">
+
+        <TextView
+            style="@style/style_button"
+            android:onClick="showShareView"
+            android:text="立即邀请" />
     </LinearLayout>
-
-</ScrollView>
+</RelativeLayout>

+ 64 - 0
app/src/main/res/layout/x_ask_top5_item.xml

@@ -0,0 +1,64 @@
+<?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">
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="#E6E6E6" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        android:paddingBottom="@dimen/content_padding_10"
+        android:paddingTop="@dimen/content_padding_10">
+
+        <RelativeLayout
+            android:layout_width="22dp"
+            android:layout_height="match_parent">
+
+            <ImageView
+                android:id="@+id/ask_top5_item_iv"
+                android:layout_width="13dp"
+                android:layout_height="14dp"
+                android:layout_marginTop="4dp" />
+        </RelativeLayout>
+
+        <TextView
+            android:id="@+id/x_ask_top5_item_user"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="3"
+            android:gravity="start"
+            android:text="用户"
+            android:textColor="#404040"
+            android:textSize="12sp" />
+
+        <TextView
+            android:id="@+id/x_ask_top5_item_money"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:gravity="start"
+            android:singleLine="true"
+            android:text="已赚"
+            android:textColor="#404040"
+            android:textSize="12sp" />
+
+        <TextView
+            android:id="@+id/x_ask_top5_item_award"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:gravity="start"
+            android:singleLine="true"
+            android:text="排行奖励"
+            android:textColor="#404040"
+            android:textSize="12sp" />
+
+    </LinearLayout>
+</LinearLayout>

+ 40 - 0
app/src/main/res/layout/x_ask_top5_title.xml

@@ -0,0 +1,40 @@
+<?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:paddingTop="@dimen/content_padding_10"
+    android:paddingBottom="@dimen/content_padding_10"
+    android:orientation="horizontal">
+    <View
+        android:layout_width="22dp"
+        android:layout_height="1dp"/>
+    <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="3"
+        android:gravity="start"
+        android:singleLine="true"
+        android:textSize="12sp"
+        android:textColor="#333333"
+        android:text="用户"/>
+    <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:gravity="start"
+        android:singleLine="true"
+        android:textSize="12sp"
+        android:textColor="#333333"
+        android:text="已赚"/>
+    <TextView
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="2"
+        android:singleLine="true"
+        android:gravity="start"
+        android:textSize="12sp"
+        android:textColor="#333333"
+        android:text="排行奖励"/>
+
+</LinearLayout>

binární
app/src/main/res/mipmap-xxhdpi/ask_top_1.png


binární
app/src/main/res/mipmap-xxhdpi/ask_top_2.png


binární
app/src/main/res/mipmap-xxhdpi/ask_top_3.png


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

@@ -9,7 +9,7 @@
     <string name="share_qr_code_content">扫描或识别二维码均可</string>
     <string name="share_link_content">万能分享,哪都能用</string>
 
-    <string name="reward">已获得提成奖励</string>
+    <string name="reward">已获得提成</string>
     <string name="friend">已邀请好友数</string>
 
     <string name="friend_to_task">好友做任务</string>