bean类字段类型修改,控件属性补充
This commit is contained in:
@@ -7,12 +7,6 @@ import java.util.List;
|
||||
|
||||
public class ShareEventItem extends BaseData implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* detailMsg :
|
||||
* result : {"page":{"total":1024,"pageSize":1,"pageNum":4,"content":[{"coordinates":[116.407653,39.966487],"uploadTimestamp":1592901273966,"timeout":1593100800000,"uploadAddress":"安定门外大街","distance":0,"dbId":"725026095564550144","poiType":"10002","sn":"ZD802B1932L00622","userId":0,"userName":"小松鼠艾德蒙","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png","likeNum":18,"notLikeNum":0,"uploadType":2,"uploadUser":"123","imgUrl":null,"content":null,"gasStationId":null,"gasStationName":null,"gasImg":null,"gasPrices":null,"endDate":"2020-06-26 00:00:00","fabulous":false,"direction":180,"virtualLikeNum":822,"status":1,"sourceType":"10002","hitId":"0K-mf3MBeovPWpwE9IfR","userType":2,"data":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]}]}}
|
||||
*/
|
||||
|
||||
private String detailMsg;
|
||||
private ResultBean result;
|
||||
|
||||
@@ -33,10 +27,6 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
}
|
||||
|
||||
public static class ResultBean {
|
||||
/**
|
||||
* page : {"total":1024,"pageSize":1,"pageNum":4,"content":[{"coordinates":[116.407653,39.966487],"uploadTimestamp":1592901273966,"timeout":1593100800000,"uploadAddress":"安定门外大街","distance":0,"dbId":"725026095564550144","poiType":"10002","sn":"ZD802B1932L00622","userId":0,"userName":"小松鼠艾德蒙","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png","likeNum":18,"notLikeNum":0,"uploadType":2,"uploadUser":"123","imgUrl":null,"content":null,"gasStationId":null,"gasStationName":null,"gasImg":null,"gasPrices":null,"endDate":"2020-06-26 00:00:00","fabulous":false,"direction":180,"virtualLikeNum":822,"status":1,"sourceType":"10002","hitId":"0K-mf3MBeovPWpwE9IfR","userType":2,"data":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]}]}
|
||||
*/
|
||||
|
||||
private PageBean page;
|
||||
|
||||
public PageBean getPage() {
|
||||
@@ -48,12 +38,6 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
}
|
||||
|
||||
public static class PageBean {
|
||||
/**
|
||||
* total : 1024
|
||||
* pageSize : 1
|
||||
* pageNum : 4
|
||||
* content : [{"coordinates":[116.407653,39.966487],"uploadTimestamp":1592901273966,"timeout":1593100800000,"uploadAddress":"安定门外大街","distance":0,"dbId":"725026095564550144","poiType":"10002","sn":"ZD802B1932L00622","userId":0,"userName":"小松鼠艾德蒙","userHead":"http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png","likeNum":18,"notLikeNum":0,"uploadType":2,"uploadUser":"123","imgUrl":null,"content":null,"gasStationId":null,"gasStationName":null,"gasImg":null,"gasPrices":null,"endDate":"2020-06-26 00:00:00","fabulous":false,"direction":180,"virtualLikeNum":822,"status":1,"sourceType":"10002","hitId":"0K-mf3MBeovPWpwE9IfR","userType":2,"data":[{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]}]
|
||||
*/
|
||||
|
||||
private int total;
|
||||
private int pageSize;
|
||||
@@ -130,76 +114,43 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* coordinates : [116.407653,39.966487]
|
||||
* uploadTimestamp : 1592901273966
|
||||
* timeout : 1593100800000
|
||||
* uploadAddress : 安定门外大街
|
||||
* distance : 0
|
||||
* dbId : 725026095564550144
|
||||
* poiType : 10002
|
||||
* sn : ZD802B1932L00622
|
||||
* userId : 0
|
||||
* userName : 小松鼠艾德蒙
|
||||
* userHead : http://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592476328925.png
|
||||
* likeNum : 18
|
||||
* notLikeNum : 0
|
||||
* uploadType : 2
|
||||
* uploadUser : 123
|
||||
* imgUrl : null
|
||||
* content : null
|
||||
* gasStationId : null
|
||||
* gasStationName : null
|
||||
* gasImg : null
|
||||
* gasPrices : null
|
||||
* endDate : 2020-06-26 00:00:00
|
||||
* fabulous : false
|
||||
* direction : 180
|
||||
* virtualLikeNum : 822
|
||||
* status : 1
|
||||
* sourceType : 10002
|
||||
* hitId : 0K-mf3MBeovPWpwE9IfR
|
||||
* userType : 2
|
||||
* data : [{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546939076.mp4%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546939%253B1592550539%2526q-key-time%253D1592546939%253B1592550539%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253D74a4058ad7579ea210dafcf78d7a19460cffb899?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D679bff1838c7d497d38f48ef999b50e80c5856c4","thumbnail":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1592546956790.png%3Fsign%3Dq-sign-algorithm%253Dsha1%2526q-ak%253DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%2526q-sign-time%253D1592546956%253B1592550556%2526q-key-time%253D1592546956%253B1592550556%2526q-header-list%253D%2526q-url-param-list%253D%2526q-signature%253Dcc9a35349fc55e433f934af88df576ae792b3987?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1595574735%3B1595578335%26q-key-time%3D1595574735%3B1595578335%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D99b5a92a4f97909d8c217dbeec2ec6e9ec1052f4","content":null,"illegalCount":null}]
|
||||
*/
|
||||
|
||||
private int viewType = ShareEventItemEnum.ITEM_TYPE_SHARE_LIST;
|
||||
private long uploadTimestamp;
|
||||
private Long uploadTimestamp;
|
||||
private long timeout;
|
||||
private String uploadAddress;
|
||||
private int distance;
|
||||
private Integer distance;
|
||||
private String dbId;
|
||||
private String poiType;
|
||||
private String sn;
|
||||
private int userId;
|
||||
private Long userId;
|
||||
private String userName;
|
||||
private String userHead;
|
||||
private int likeNum;
|
||||
private Integer likeNum;
|
||||
private int notLikeNum;
|
||||
private int uploadType;
|
||||
private Integer uploadType;
|
||||
private String uploadUser;
|
||||
private Object imgUrl;
|
||||
private Object content;
|
||||
private Object gasStationId;
|
||||
private Object gasStationName;
|
||||
private Object gasImg;
|
||||
private Object gasPrices;
|
||||
private String imgUrl;
|
||||
private String content;
|
||||
private String gasStationId;
|
||||
private String gasStationName;
|
||||
private String gasImg;
|
||||
private String gasPrices;
|
||||
private String endDate;
|
||||
private boolean fabulous;
|
||||
private int direction;
|
||||
private int virtualLikeNum;
|
||||
private int status;
|
||||
private Integer direction;
|
||||
private Integer virtualLikeNum;
|
||||
private Integer status;
|
||||
private String sourceType;
|
||||
private String hitId;
|
||||
private int userType;
|
||||
private Integer userType;
|
||||
private List<Double> coordinates;
|
||||
private List<DataBean> data;
|
||||
|
||||
public long getUploadTimestamp() {
|
||||
public Long getUploadTimestamp() {
|
||||
return uploadTimestamp;
|
||||
}
|
||||
|
||||
public void setUploadTimestamp(long uploadTimestamp) {
|
||||
public void setUploadTimestamp(Long uploadTimestamp) {
|
||||
this.uploadTimestamp = uploadTimestamp;
|
||||
}
|
||||
|
||||
@@ -207,7 +158,7 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
public void setTimeout(long timeout) {
|
||||
public void setTimeout(Long timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
@@ -219,11 +170,11 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.uploadAddress = uploadAddress;
|
||||
}
|
||||
|
||||
public int getDistance() {
|
||||
public Integer getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(int distance) {
|
||||
public void setDistance(Integer distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
|
||||
@@ -251,11 +202,11 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public int getUserId() {
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(int userId) {
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@@ -275,11 +226,11 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.userHead = userHead;
|
||||
}
|
||||
|
||||
public int getLikeNum() {
|
||||
public Integer getLikeNum() {
|
||||
return likeNum;
|
||||
}
|
||||
|
||||
public void setLikeNum(int likeNum) {
|
||||
public void setLikeNum(Integer likeNum) {
|
||||
this.likeNum = likeNum;
|
||||
}
|
||||
|
||||
@@ -291,11 +242,11 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.notLikeNum = notLikeNum;
|
||||
}
|
||||
|
||||
public int getUploadType() {
|
||||
public Integer getUploadType() {
|
||||
return uploadType;
|
||||
}
|
||||
|
||||
public void setUploadType(int uploadType) {
|
||||
public void setUploadType(Integer uploadType) {
|
||||
this.uploadType = uploadType;
|
||||
}
|
||||
|
||||
@@ -307,51 +258,51 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.uploadUser = uploadUser;
|
||||
}
|
||||
|
||||
public Object getImgUrl() {
|
||||
public String getImgUrl() {
|
||||
return imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(Object imgUrl) {
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
public Object getContent() {
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(Object content) {
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Object getGasStationId() {
|
||||
public String getGasStationId() {
|
||||
return gasStationId;
|
||||
}
|
||||
|
||||
public void setGasStationId(Object gasStationId) {
|
||||
public void setGasStationId(String gasStationId) {
|
||||
this.gasStationId = gasStationId;
|
||||
}
|
||||
|
||||
public Object getGasStationName() {
|
||||
public String getGasStationName() {
|
||||
return gasStationName;
|
||||
}
|
||||
|
||||
public void setGasStationName(Object gasStationName) {
|
||||
public void setGasStationName(String gasStationName) {
|
||||
this.gasStationName = gasStationName;
|
||||
}
|
||||
|
||||
public Object getGasImg() {
|
||||
public String getGasImg() {
|
||||
return gasImg;
|
||||
}
|
||||
|
||||
public void setGasImg(Object gasImg) {
|
||||
public void setGasImg(String gasImg) {
|
||||
this.gasImg = gasImg;
|
||||
}
|
||||
|
||||
public Object getGasPrices() {
|
||||
public String getGasPrices() {
|
||||
return gasPrices;
|
||||
}
|
||||
|
||||
public void setGasPrices(Object gasPrices) {
|
||||
public void setGasPrices(String gasPrices) {
|
||||
this.gasPrices = gasPrices;
|
||||
}
|
||||
|
||||
@@ -371,27 +322,27 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.fabulous = fabulous;
|
||||
}
|
||||
|
||||
public int getDirection() {
|
||||
public Integer getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(int direction) {
|
||||
public void setDirection(Integer direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public int getVirtualLikeNum() {
|
||||
public Integer getVirtualLikeNum() {
|
||||
return virtualLikeNum;
|
||||
}
|
||||
|
||||
public void setVirtualLikeNum(int virtualLikeNum) {
|
||||
public void setVirtualLikeNum(Integer virtualLikeNum) {
|
||||
this.virtualLikeNum = virtualLikeNum;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@@ -411,11 +362,11 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.hitId = hitId;
|
||||
}
|
||||
|
||||
public int getUserType() {
|
||||
public Integer getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(int userType) {
|
||||
public void setUserType(Integer userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
@@ -445,7 +396,7 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
|
||||
private String url;
|
||||
private String thumbnail;
|
||||
private Object content;
|
||||
private String content;
|
||||
private Object illegalCount;
|
||||
|
||||
public String getUrl() {
|
||||
@@ -464,11 +415,11 @@ public class ShareEventItem extends BaseData implements Serializable {
|
||||
this.thumbnail = thumbnail;
|
||||
}
|
||||
|
||||
public Object getContent() {
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(Object content) {
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.v2x.fragment;
|
||||
|
||||
import android.nfc.Tag;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -37,12 +38,13 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
private V2XShareEventAdapter adapter;
|
||||
private ArrayList dataArrayList = new ArrayList();
|
||||
private int pageNum = 1;
|
||||
final CountDownLatch countDownLatch = new CountDownLatch(2);
|
||||
final CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
private V2XShareNetworkModel v2XShareNetworkModel;
|
||||
|
||||
//动画
|
||||
private ImageView loadingImageView;
|
||||
private V2XAnimationManager v2XAnimationManager;
|
||||
private Button reloadBUtton;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@@ -76,8 +78,8 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
private void initData() {
|
||||
loadingImageView = mRootView.findViewById(R.id.loading_imageview);
|
||||
v2XAnimationManager.animationWithTarget(loadingImageView, AnimationResources.loadingRes, 100);
|
||||
getShareEventDescription();
|
||||
getShareEventList(pageNum, 10);
|
||||
getShareEventDescription();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -92,7 +94,7 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
if (resultData != null && resultData.getResult() != null
|
||||
&& resultData.getResult().getEnthusiasmIndex() != null) {
|
||||
dataArrayList.add(resultData.getResult().getEnthusiasmIndex());
|
||||
Log.d(TAG, "热心指数---:" + resultData.getResult().getEnthusiasmIndex());
|
||||
Log.d(TAG, "热心指数:" + resultData.getResult().getEnthusiasmIndex());
|
||||
}
|
||||
countDownLatch.countDown();
|
||||
}
|
||||
@@ -100,24 +102,26 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
countDownLatch.countDown();
|
||||
loadingError(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void loadingError(boolean error) {
|
||||
Button errorBtn = mRootView.findViewById(R.id.loading_error);
|
||||
reloadBUtton = mRootView.findViewById(R.id.loading_error);
|
||||
if (error) {
|
||||
errorBtn.setVisibility(View.VISIBLE);
|
||||
errorBtn.setOnClickListener(new View.OnClickListener() {
|
||||
reloadBUtton.setVisibility(View.VISIBLE);
|
||||
reloadBUtton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
getShareEventList(pageNum, 10);
|
||||
errorBtn.setVisibility(View.INVISIBLE);
|
||||
reloadBUtton.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
}
|
||||
v2XAnimationManager.stop();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -130,48 +134,57 @@ public class V2XShareEventsFragment extends MvpFragment implements AdapterCallba
|
||||
public void onSuccess(Object result) {
|
||||
ShareEventItem resultData = (ShareEventItem) result;
|
||||
ShareEventLoadMoreItem item = new ShareEventLoadMoreItem();
|
||||
if (resultData != null && resultData.getResult() != null) {
|
||||
if (resultData.getResult().getPage() != null) {
|
||||
int total = resultData.getResult().getPage().getTotal();
|
||||
if (total == 0) {
|
||||
//空白
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY);
|
||||
dataArrayList.add(item);
|
||||
} else {
|
||||
if (resultData.getResult().getPage().getContent().size() > 0) {
|
||||
//当前页有数据
|
||||
if (dataArrayList.size() > 0) {
|
||||
Object data = dataArrayList.get(dataArrayList.size() - 1);
|
||||
if (data instanceof ShareEventLoadMoreItem) {
|
||||
dataArrayList.remove(dataArrayList.size() - 1);
|
||||
}
|
||||
}
|
||||
dataArrayList.addAll(resultData.getResult().getPage().getContent());
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_LOAD_MORE_STATUS);
|
||||
item.setStatusText("查看更早记录");
|
||||
try {
|
||||
if (resultData != null && resultData.getResult() != null) {
|
||||
if (resultData.getResult().getPage() != null) {
|
||||
int total = resultData.getResult().getPage().getTotal();
|
||||
if (total == 0) {
|
||||
//空白
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY);
|
||||
dataArrayList.add(item);
|
||||
} else {
|
||||
//当前页没有数据
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_NO_MORE);
|
||||
item.setStatusText("没有更多了");
|
||||
if (resultData.getResult().getPage().getContent().size() > 0) {
|
||||
//当前页有数据
|
||||
if (dataArrayList.size() > 0) {
|
||||
Object data = dataArrayList.get(dataArrayList.size() - 1);
|
||||
if (data instanceof ShareEventLoadMoreItem) {
|
||||
dataArrayList.remove(dataArrayList.size() - 1);
|
||||
}
|
||||
}
|
||||
dataArrayList.addAll(resultData.getResult().getPage().getContent());
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_LOAD_MORE_STATUS);
|
||||
item.setStatusText("查看更早记录");
|
||||
} else {
|
||||
//当前页没有数据
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_NO_MORE);
|
||||
item.setStatusText("没有更多了");
|
||||
}
|
||||
if (total > 10){
|
||||
dataArrayList.add(item);
|
||||
}
|
||||
}
|
||||
dataArrayList.add(item);
|
||||
}
|
||||
Log.d(TAG, "分享列表:" + dataArrayList.get(0));
|
||||
} else {
|
||||
//空白
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY);
|
||||
dataArrayList.add(item);
|
||||
}
|
||||
Log.d(TAG, "分享列表---:" + dataArrayList.get(0));
|
||||
} else {
|
||||
//空白
|
||||
item.setViewType(ShareEventItemEnum.ITEM_TYPE_SHARE_EMPTY);
|
||||
dataArrayList.add(item);
|
||||
adapter.notifyDataSetChanged();
|
||||
// countDownLatch.countDown();
|
||||
v2XAnimationManager.stop();
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.d(TAG,"分享列表错误信息",e.fillInStackTrace());
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
countDownLatch.countDown();
|
||||
v2XAnimationManager.stop();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
countDownLatch.countDown();
|
||||
// countDownLatch.countDown();
|
||||
v2XAnimationManager.stop();
|
||||
loadingError(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class V2XShareNetworkModel {
|
||||
}
|
||||
|
||||
public void getShareEventDescription(V2XRefreshCallback callback) {
|
||||
ShareEventParameter parameter = new ShareEventParameter(Utils.getSn());
|
||||
ShareEventParameter parameter = new ShareEventParameter("E841AB2028LZD00174");
|
||||
Map<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("data", GsonUtil.jsonFromObject(parameter));
|
||||
|
||||
@@ -59,7 +59,7 @@ public class V2XShareNetworkModel {
|
||||
* 分享列表
|
||||
* */
|
||||
public void getShareEventList(int page, int size, V2XRefreshCallback callback) {
|
||||
ShareEventParameter parameter = new ShareEventParameter(Utils.getSn(), page, 10);
|
||||
ShareEventParameter parameter = new ShareEventParameter("E841AB2028LZD00174", page, 10);
|
||||
HashMap<String, Object> parameters = new HashMap<>();
|
||||
parameters.put("data", GsonUtil.jsonFromObject(parameter));
|
||||
mRefreshApiService.getShareEventList(parameters)
|
||||
|
||||
Reference in New Issue
Block a user