ソースを参照

优化我的定向货币详情对话框

zengjiebin 7 年 前
コミット
fe09513432

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

@@ -504,4 +504,9 @@ public interface ApiService {
      */
     @GET("app/about_us/new_about_us")
     Observable<BaseMessage> getNewAboutUs();
+    /**
+     * 获取定向消费游戏列表
+     */
+    @GET("app/game_consumption/my_games")
+    Observable<BaseMessage> getMyGames(@Query("page") int page, @Query("per_page") int per_page);
 }

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

@@ -3,6 +3,109 @@ package com.sheep.gamegroup.model.entity;
 /**
  * Created by realicing on 2018/6/7.
  * realicing@sina.com
+ * {
+ "name": "游戏新游戏",
+ "package_name": "游戏新游戏",
+ "icon": "http://staticcdn.kuaifazs.com/upload/game/201806/11/3c/d6/O800O0.png",
+ "balance": 100,
+ "game_id": 123,
+ "min_amount": 2,
+ "ratio": 3,
+ "download_url": "12323",
+ "task_id": 415
+ }
  */
 public class OrienteeringDetail {
+
+    private String name;
+
+    private String package_name;
+
+    private String icon;
+
+    private int balance;
+
+    private int game_id;
+
+    private int min_amount;
+
+    private int ratio;
+    private int id;
+
+    private String download_url;
+
+    private int task_id;
+
+    public void setName(String name){
+        this.name = name;
+    }
+    public String getName(){
+        return this.name;
+    }
+    public void setPackage_name(String package_name){
+        this.package_name = package_name;
+    }
+    public String getPackage_name(){
+        return this.package_name;
+    }
+    public void setIcon(String icon){
+        this.icon = icon;
+    }
+    public String getIcon(){
+        return this.icon;
+    }
+    public void setBalance(int balance){
+        this.balance = balance;
+    }
+    public int getBalance(){
+        return this.balance;
+    }
+    public void setGame_id(int game_id){
+        this.game_id = game_id;
+    }
+    public int getGame_id(){
+        return this.game_id;
+    }
+    public void setMin_amount(int min_amount){
+        this.min_amount = min_amount;
+    }
+    public int getMin_amount(){
+        return this.min_amount;
+    }
+    public void setRatio(int ratio){
+        this.ratio = ratio;
+    }
+    public int getRatio(){
+        return this.ratio;
+    }
+    public void setDownload_url(String download_url){
+        this.download_url = download_url;
+    }
+    public String getDownload_url(){
+        return this.download_url;
+    }
+    public void setTask_id(int task_id){
+        this.task_id = task_id;
+    }
+    public int getTask_id(){
+        return this.task_id;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+
+
+
+
+
+    @Override
+    public boolean equals(Object obj) {
+        return obj instanceof OrienteeringDetail && ((OrienteeringDetail) obj).id == id;
+    }
 }

+ 27 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/UserAssets.java

@@ -3,6 +3,15 @@ package com.sheep.gamegroup.model.entity;
 /**
  * Created by realicing on 2018/5/9.
  * realicing@sina.com
+ * {
+ "sheep_bi_total": 22.4,
+ "task_reward": 14.8,
+ "proxy_commission": 0,
+ "recharge_amount": 2,
+ "cash_withdrawal": 20.4,
+ "extension_extract": 4.6,
+ "directional_currency": 0
+ }
  */
 public class UserAssets {
     private String sheep_bi_total;
@@ -14,6 +23,8 @@ public class UserAssets {
     private String proxy_commission;
 
     private String cash_withdrawal;
+    private String extension_extract;//推广提成
+    private String directional_currency;//定向消费货币
 
     public void setSheep_bi_total(String sheep_bi_total){
         this.sheep_bi_total = sheep_bi_total;
@@ -47,4 +58,20 @@ public class UserAssets {
     public void setCash_withdrawal(String cash_withdrawal) {
         this.cash_withdrawal = cash_withdrawal;
     }
+
+    public String getExtension_extract() {
+        return extension_extract;
+    }
+
+    public void setExtension_extract(String extension_extract) {
+        this.extension_extract = extension_extract;
+    }
+
+    public String getDirectional_currency() {
+        return directional_currency;
+    }
+
+    public void setDirectional_currency(String directional_currency) {
+        this.directional_currency = directional_currency;
+    }
 }

+ 8 - 68
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -12,15 +12,12 @@ import android.text.Html;
 import android.text.TextUtils;
 import android.text.method.ScrollingMovementMethod;
 import android.view.LayoutInflater;
-import android.view.SurfaceHolder;
 import android.view.View;
-import android.view.ViewGroup;
 import android.view.Window;
 import android.view.WindowManager;
 import android.webkit.WebView;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
-import android.widget.ListView;
 import android.widget.TextView;
 import android.widget.VideoView;
 
@@ -28,9 +25,9 @@ import com.bumptech.glide.Glide;
 import com.bumptech.glide.request.RequestOptions;
 import com.sheep.gamegroup.model.entity.Advertising;
 import com.sheep.gamegroup.model.entity.DialogConfig;
-import com.sheep.gamegroup.model.entity.OrienteeringDetail;
 import com.sheep.gamegroup.view.activity.SplashAct;
-import com.sheep.gamegroup.view.adapter.ArrayAdapter;
+import com.sheep.gamegroup.view.dialog.DialogOrienteeringDetails;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -39,7 +36,6 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.util.List;
 
 /**
  * Created by realicing on 2018/5/11.
@@ -369,7 +365,7 @@ public class ViewUtil {
             final View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
             LinearLayout dialog_center_ll = dialog_parent.findViewById(R.id.dialog_center_ll);
             View view = LayoutInflater.from(activity).inflate(R.layout.dialog_half_screen_ad, dialog_center_ll, true);
-            dialog_title.setText("推荐给好友");
+            setText(dialog_title, advertising.getName());
 
             ImageView ad_iv = view.findViewById(R.id.ad_iv);
             VideoView ad_video_view = view.findViewById(R.id.ad_video_view);
@@ -402,8 +398,9 @@ public class ViewUtil {
             }
             RxjavaCountDownTimer timer = null;
             if (advertising.getShow_time() > 0) {
+                ad_skip.setVisibility(View.VISIBLE);
                 dialog.setCancelable(false);
-                timer = RxjavaCountDownTimer.getInstance(advertising.getShow_time())
+                timer = RxjavaCountDownTimer.getInstance(BuildConfig.DEBUG ? 1 : advertising.getShow_time())
                         .setOnTickListener(new RxjavaCountDownTimer.OnTickListener() {
                             @Override
                             public void onFinish() {
@@ -421,6 +418,8 @@ public class ViewUtil {
                                 ad_skip.setText(activity.getString(R.string.tip_skip, time));
                             }
                         }).start();
+            } else {
+                ad_skip.setVisibility(View.GONE);
             }
 
             final RxjavaCountDownTimer finalTimer = timer;
@@ -461,66 +460,7 @@ public class ViewUtil {
     }
     //显示定向货币详情
     public static void showOrienteeringDetails() {
-        final Activity activity = ActivityManager.getInstance().currentActivity();
-        if (activity != null) {
-            View dialog_parent = View.inflate(activity, R.layout.dialog_parent, null);
-            final AlertDialog dialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
-                    .setView(dialog_parent)
-                    .create();
-            TextView dialog_title = dialog_parent.findViewById(R.id.dialog_title);
-            final View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
-            LinearLayout dialog_center_ll = dialog_parent.findViewById(R.id.dialog_center_ll);
-            View view = LayoutInflater.from(activity).inflate(R.layout.dialog_orienteering_details, dialog_center_ll, true);
-            dialog_title.setText("定向货币详情");
-
-            ListView dialog_list_view = (ListView)view.findViewById(R.id.dialog_list_view);
-            TextView dialog_btn_left = (TextView)view.findViewById(R.id.dialog_btn_left);
-            TextView dialog_btn_right = (TextView)view.findViewById(R.id.dialog_btn_right);
-
-            List<OrienteeringDetail> list = ListUtil.emptyList();
-            list.add(new OrienteeringDetail());
-            list.add(new OrienteeringDetail());
-            list.add(new OrienteeringDetail());
-            dialog_list_view.setAdapter(new ArrayAdapter<OrienteeringDetail>(activity, R.layout.dialog_orienteering_details_item, list){
-                @Override
-                public boolean convert(int position, View convertView, ViewGroup parent, OrienteeringDetail item) {
-                    //
-                    return true;
-                }
-            });
-            dialog_btn_left.setText("确定");
-            dialog_btn_left.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    dialog.dismiss();
-                }
-            });
-            dialog_btn_right.setText("充值");
-            dialog_btn_right.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    Jump2View.getInstance().goRechargeAct(activity, null);
-                    dialog.dismiss();
-                }
-            });
-            dialog_close.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    dialog.dismiss();
-                }
-            });
-
-            dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
-                @Override
-                public void onDismiss(DialogInterface dialogInterface) {
-                }
-            });
-            try {
-                dialog.show();
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
+        new DialogOrienteeringDetails().showOrienteeringDetails();
     }
 
     public static void setText(TextView textView) {

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

@@ -56,6 +56,8 @@ public class ActMyMoney extends BaseActivity {
     TextView my_money_recharge_amount;
     @BindView(R.id.my_money_available_amount)
     TextView my_money_available_amount;
+    @BindView(R.id.my_money_dingxiang_amount)
+    TextView my_money_dingxiang_amount;
 
     private GiftpackListAdapter mAdapter;
 
@@ -154,9 +156,10 @@ public class ActMyMoney extends BaseActivity {
     private void loadData(UserAssets userAssets) {
         my_money_total_money.setText(getString(R.string.total_money, userAssets.getSheep_bi_total()));
         my_money_task_reward.setText(getString(R.string.task_reward, userAssets.getTask_reward()));
-        my_money_agent_extract.setText(getString(R.string.agent_extract, userAssets.getProxy_commission()));
+        my_money_agent_extract.setText(getString(R.string.agent_extract, userAssets.getExtension_extract()));
         my_money_recharge_amount.setText(getString(R.string.recharge_amount, userAssets.getRecharge_amount()));
         my_money_available_amount.setText(getString(R.string.available_amount, FormatAny.getInstance().formatString(userAssets.getCash_withdrawal())));
+        my_money_dingxiang_amount.setText(getString(R.string.dingxiang_amount, FormatAny.getInstance().formatString(userAssets.getDirectional_currency())));
     }
     private void resetData() {
         my_money_total_money.setText(getString(R.string.total_money, "0.00"));
@@ -164,6 +167,7 @@ public class ActMyMoney extends BaseActivity {
         my_money_agent_extract.setText(getString(R.string.agent_extract, "0.00"));
         my_money_recharge_amount.setText(getString(R.string.recharge_amount, "0.00"));
         my_money_available_amount.setText(getString(R.string.available_amount, "0.00"));
+        my_money_dingxiang_amount.setText(getString(R.string.dingxiang_amount, "0.00"));
     }
 
 }

+ 24 - 22
app/src/main/java/com/sheep/gamegroup/view/activity/DialogActivity.java

@@ -229,27 +229,27 @@ public class DialogActivity extends Activity implements TaskDialogContract.View
                     toTestPlay();
                     break;
                 case 2://开始下载
-                    if(task.getTaskState() == IEntity.STATE_RUNNING){
-                        task.stop();
-                    } else if(task.getTaskState() == IEntity.STATE_FAIL){
-                        task.cancel(true);
-                        task.cancel(true);
-                        task.removeRecord();
-                        task.removeRecord();
-                    } else {
+                    if(task != null) {
+                        if (task.getTaskState() == IEntity.STATE_RUNNING) {
+                            task.stop();
+                        } else if (task.getTaskState() == IEntity.STATE_FAIL) {
+                            task.cancel(true);
+                            task.removeRecord();
+                        } else {
 //                        task.setFilePath(filePath);
 //                        task.start();
-                        mDownloadTaskService.start(downLoadInfo);
-                    }
-                    new Thread(new Runnable() {
-                        @Override
-                        public void run() {
-                            if(mDownloadTaskService.addDownloadTask(downLoadInfo)){
-                                //发送红点信息
-                                EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.TIPS_DOWN_ICON));
-                            }
+                            mDownloadTaskService.start(downLoadInfo);
                         }
-                    }).start();
+                        new Thread(new Runnable() {
+                            @Override
+                            public void run() {
+                                if(mDownloadTaskService.addDownloadTask(downLoadInfo)){
+                                    //发送红点信息
+                                    EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.TIPS_DOWN_ICON));
+                                }
+                            }
+                        }).start();
+                    }
                     UMConfigUtils.onEvent(UMConfigUtils.Event.TASK_DOWNLOAD);
                     break;
                 case 3://开始安装
@@ -266,12 +266,14 @@ public class DialogActivity extends Activity implements TaskDialogContract.View
                     }else if(!TextUtils.isEmpty(PackageUtil.isExistsFile(activity, taskEty.getPackage_names(), ""))){
                         ApkUtils.installApk(activity, filePath);
                     }else{
-                        task.cancel(true);
-                        task.removeRecord();
+                        if(task != null) {
+                            task.cancel(true);
+                            task.removeRecord();
 //                        task.setFilePath(filePath);
 //                        task.start();
-                        mDownloadTaskService.start(downLoadInfo);
-                        type = 2;
+                            mDownloadTaskService.start(downLoadInfo);
+                            type = 2;
+                        }
                     }
                     break;
                 case 4://信用卡

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

@@ -209,14 +209,15 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
         if(splash_know_ad_tv != null)
             splash_know_ad_tv.setVisibility(View.VISIBLE);
         if(advertising.getShow_time() > 0)
-            timer = RxjavaCountDownTimer.getInstance(advertising.getShow_time())
+            timer = RxjavaCountDownTimer.getInstance(BuildConfig.DEBUG ? 1 : advertising.getShow_time())
                     .setOnTickListener(new RxjavaCountDownTimer.OnTickListener() {
                         @Override
                         public void onFinish() {
                             splash_skip.setEnabled(true);
                             splash_skip.setVisibility(View.GONE);
                             btnJoin.setVisibility(View.VISIBLE);
-                            mHandler.sendEmptyMessageDelayed(0, 1000);
+                            if(isResume)
+                                mHandler.sendEmptyMessageDelayed(0, BuildConfig.DEBUG ? 100 : 1000);
                         }
 
                         @Override
@@ -227,6 +228,18 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                     }).start();
         mHandler.removeMessages(0);
     }
+    private boolean isResume = false;
+    @Override
+    protected void onResume() {
+        super.onResume();
+        isResume = true;
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        isResume = false;
+    }
 
     @Override
     public void onPermissionsGranted(int i, @NonNull List<String> list) {

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

@@ -373,7 +373,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
             switch (taskState) {
                 case IEntity.STATE_RUNNING:
                     type = 1;
-                    buttonStr = task.getPercent() + "%";
+                    buttonStr = Math.abs(task.getPercent()) + "%";
                     break;
                 case IEntity.STATE_STOP:
                     type = 1;
@@ -471,8 +471,6 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
                                 task.stop();
                             } else if (task.getTaskState() == IEntity.STATE_FAIL) {
                                 task.cancel(true);
-                                task.cancel(true);
-                                task.removeRecord();
                                 task.removeRecord();
                             } else {
     //                            task.setFilePath(filePath);
@@ -808,9 +806,8 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
             if (task.getKey().equals(taskEty.getDownload_link())) {
                 int p = task.getPercent();    //任务进度百分比
                 String speed = task.getConvertSpeed();    //转换单位后的下载速度,单位转换需要在配置文件中打开
-                long speed1 = task.getSpeed(); //原始byte长度速度
-                btnTaskItem.setText(String.format(Locale.CHINA, "%d",Math.abs(p)));
-                btnTaskItem.append("%");
+//                long speed1 = task.getSpeed(); //原始byte长度速度
+                btnTaskItem.setText(String.format(Locale.CHINA, "%d%%",Math.abs(p)));
                 System.out.println("Aria p " + p + ", speed = " + speed);
             }
         } catch (Exception e) {

+ 195 - 0
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogOrienteeringDetails.java

@@ -0,0 +1,195 @@
+package com.sheep.gamegroup.view.dialog;
+
+import android.app.Activity;
+import android.content.DialogInterface;
+import android.os.Handler;
+import android.support.v7.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.OrienteeringDetail;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.ActivityManager;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.ArrayAdapter;
+import com.sheep.gamegroup.view.customview.RefreshLayout;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.List;
+import java.util.Locale;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/6/12.
+ * realicing@sina.com
+ */
+public class DialogOrienteeringDetails {
+    private Activity activity;
+    private int gao;
+    public DialogOrienteeringDetails(){
+        activity = ActivityManager.getInstance().currentActivity();
+        gao = SheepApp.getInstance().getResources().getDimensionPixelSize(R.dimen.content_padding_10)*5;
+        maxShowCount = Math.max(6, G.HEIGHT*3/4/gao);
+    }
+    private View empty_view;
+    private RefreshLayout swipe_container;
+    private ListView dialog_list_view;
+
+    private ArrayAdapter<OrienteeringDetail> adapter;
+    private List<OrienteeringDetail> list = ListUtil.emptyList();
+    public void showOrienteeringDetails() {
+        if (activity != null) {
+            View dialog_parent = View.inflate(activity, R.layout.dialog_parent, null);
+            final AlertDialog dialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
+                    .setView(dialog_parent)
+                    .create();
+            TextView dialog_title = dialog_parent.findViewById(R.id.dialog_title);
+            final View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
+            LinearLayout dialog_center_ll = dialog_parent.findViewById(R.id.dialog_center_ll);
+            View view = LayoutInflater.from(activity).inflate(R.layout.dialog_orienteering_details, dialog_center_ll, true);
+            dialog_title.setText("定向货币详情");
+
+            empty_view = view.findViewById(R.id.empty_view);
+            swipe_container = view.findViewById(R.id.swipe_container);
+            dialog_list_view = (ListView)view.findViewById(R.id.dialog_list_view);
+            TextView dialog_btn_left = (TextView)view.findViewById(R.id.dialog_btn_left);
+            TextView dialog_btn_right = (TextView)view.findViewById(R.id.dialog_btn_right);
+
+            swipe_container.setFooterView(activity, dialog_list_view, R.layout.listview_footer);
+            adapter = new ArrayAdapter<OrienteeringDetail>(activity, R.layout.dialog_orienteering_details_item, list){
+                @Override
+                public boolean convert(int position, View convertView, ViewGroup parent, OrienteeringDetail item) {
+                    TextView dialog_label = convertView.findViewById(R.id.dialog_label);
+                    TextView dialog_value = convertView.findViewById(R.id.dialog_value);
+                    ViewUtil.setText(dialog_label, item.getName());
+                    ViewUtil.setText(dialog_value, String.format(Locale.CHINA, "余额%d元", item.getBalance()));
+                    return true;
+                }
+            };
+            dialog_list_view.setAdapter(adapter);
+
+            swipe_container.setOnRefreshListener(new RefreshLayout.OnRefreshListener() {
+                @Override
+                public void onRefresh() {
+                    refreshData();
+                }
+            });
+
+            swipe_container.setOnLoadListener(new RefreshLayout.OnLoadListener() {
+                @Override
+                public void onLoad() {
+                    swipe_container.setLoading(false);
+                    if(ListUtil.size(list) >= per_page*page){
+                        page += 1;
+                        initData();
+                    }else {
+
+                        new Handler().postDelayed(new Runnable() {
+                            @Override
+                            public void run() {
+                                swipe_container.setRefreshing(false);
+                            }
+                        },1000);
+                    }
+
+                }
+            });
+
+            dialog_btn_left.setText("确定");
+            dialog_btn_left.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    dialog.dismiss();
+                }
+            });
+            dialog_btn_right.setText("充值");
+            dialog_btn_right.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    Jump2View.getInstance().goRechargeAct(activity, null);
+                    dialog.dismiss();
+                }
+            });
+            dialog_close.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    dialog.dismiss();
+                }
+            });
+
+            dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
+                @Override
+                public void onDismiss(DialogInterface dialogInterface) {
+                }
+            });
+            try {
+                dialog.show();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            initData();
+        }
+    }
+
+    private int page = 1;//页数
+    private int per_page = 10;
+    private int maxShowCount;
+    private void refreshData() {
+        list.clear();
+        page = 1;
+        initData();
+    }
+    public void initData() {
+        empty_view.setVisibility(View.GONE);
+        SheepApp.getInstance().getNetComponent().getApiService().getMyGames(page, per_page)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onNext "+ JSON.toJSONString(baseMessage));
+                                List<OrienteeringDetail> newList = baseMessage.getDatas(OrienteeringDetail.class);
+                                ListUtil.addAll(list, newList);
+                                if(ListUtil.isEmpty(list)){
+                                    noDatanotify();
+                                } else {
+                                    empty_view.setVisibility(View.GONE);
+                                    dialog_list_view.setVisibility(View.VISIBLE);
+                                    int size = Math.min(maxShowCount, ListUtil.size(list));
+                                    RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, size * gao);
+                                    swipe_container.setLayoutParams(layoutParams);
+                                    adapter.notifyDataSetChanged();
+                                    swipe_container.setRefreshing(false);
+                                }
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                LogUtil.println("baseMessage onError "+JSON.toJSONString(baseMessage));
+                                G.showToast(baseMessage);
+                                noDatanotify();
+                            }
+                        });
+    }
+    private void noDatanotify(){
+        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, 6*gao);
+        swipe_container.setLayoutParams(layoutParams);
+        empty_view.setVisibility(View.VISIBLE);
+        swipe_container.setRefreshing(false);
+        adapter.notifyDataSetChanged();
+    }
+}

+ 1 - 0
app/src/main/res/layout/dialog_half_screen_ad.xml

@@ -34,6 +34,7 @@
             android:paddingTop="2dp"
             android:text="跳过"
             android:textColor="#918F8F"
+            android:visibility="gone"
             android:textSize="14sp" />
     </RelativeLayout>
 

+ 28 - 9
app/src/main/res/layout/dialog_orienteering_details.xml

@@ -3,15 +3,34 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical">
-    <ListView
-        android:id="@+id/dialog_list_view"
+
+    <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="@dimen/content_padding_10"
-        android:listSelector="@null"
-        android:dividerHeight="1dp"
-        android:divider="@color/black_6_e"
-        android:background="@drawable/shape_ash_stroke_rectangle"/>
-    <include layout="@layout/x_msg_dialog_btn"/>
+        android:layout_height="wrap_content">
+
+        <include
+            android:id="@+id/empty_view"
+            layout="@layout/empty_view"
+            android:layout_width="match_parent"
+            android:layout_height="300dp" />
+
+        <com.sheep.gamegroup.view.customview.RefreshLayout
+            android:id="@+id/swipe_container"
+            android:layout_width="match_parent"
+            android:layout_height="50dp">
+
+            <ListView
+                android:id="@+id/dialog_list_view"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/shape_ash_stroke_rectangle"
+                android:scrollbars="none"
+                android:divider="@color/black_6_e"
+                android:dividerHeight="1dp"
+                android:listSelector="@null"/>
+        </com.sheep.gamegroup.view.customview.RefreshLayout>
+    </RelativeLayout>
+
+    <include layout="@layout/x_msg_dialog_btn" />
 
 </LinearLayout>

+ 5 - 3
app/src/main/res/layout/dialog_orienteering_details_item.xml

@@ -1,12 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
+    android:layout_height="50dp"
     android:gravity="center_vertical"
     android:orientation="horizontal">
     <TextView
+        android:id="@+id/dialog_label"
         android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:layout_height="50dp"
         android:layout_weight="1"
         android:textColor="@color/black_6_3"
         android:gravity="center"
@@ -17,8 +18,9 @@
         android:layout_height="50dp"
         android:background="@color/black_6_e"/>
     <TextView
+        android:id="@+id/dialog_value"
         android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:layout_height="50dp"
         android:layout_weight="1"
         android:textColor="@color/black_6_3"
         android:gravity="center"