version:2.1 beta
fix: update:没有数据显示图标
This commit is contained in:
@@ -82,6 +82,15 @@ public class SecondFragment extends BaseFragment {
|
||||
|
||||
@BindView(R.id.cl_demand)
|
||||
ConstraintLayout cl_demand;
|
||||
@BindView(R.id.cl1)
|
||||
ConstraintLayout cl1;
|
||||
@BindView(R.id.cl2)
|
||||
ConstraintLayout cl2;
|
||||
@BindView(R.id.cl3)
|
||||
ConstraintLayout cl3;
|
||||
@BindView(R.id.cl4)
|
||||
ConstraintLayout cl4;
|
||||
|
||||
|
||||
private View rootView;
|
||||
private Context mContext;
|
||||
@@ -160,11 +169,14 @@ public class SecondFragment extends BaseFragment {
|
||||
public void onNext(@NonNull BaseResponse<List<DemandBean>> listBaseResponse) {
|
||||
Log.e("getDemandList", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
cl4.setVisibility(View.VISIBLE);
|
||||
List<DemandBean> demandBeans = listBaseResponse.data;
|
||||
if (demandBeans != null && demandBeans.size() != 0) {
|
||||
DemandBean demandBean = demandBeans.get(0);
|
||||
setDemand(demandBean);
|
||||
}
|
||||
}else {
|
||||
cl4.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,11 +212,14 @@ public class SecondFragment extends BaseFragment {
|
||||
public void onNext(@NonNull BaseResponse<List<ActivityBean>> listBaseResponse) {
|
||||
Log.e("getActivityList", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
cl3.setVisibility(View.VISIBLE);
|
||||
List<ActivityBean> activityBeans = listBaseResponse.data;
|
||||
if (activityBeans != null && activityBeans.size() != 0) {
|
||||
ActivityBean activityBean = activityBeans.get(0);
|
||||
setActivity(activityBean);
|
||||
}
|
||||
}else {
|
||||
cl3.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,11 +278,14 @@ public class SecondFragment extends BaseFragment {
|
||||
public void onNext(@NonNull BaseResponse<List<GoodsInfo>> listBaseResponse) {
|
||||
Log.e("getGoods", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
cl1.setVisibility(View.VISIBLE);
|
||||
List<GoodsInfo> goodsInfoList = listBaseResponse.data;
|
||||
if (goodsInfoList != null && goodsInfoList.size() != 0) {
|
||||
GoodsInfo goodsInfo = goodsInfoList.get(0);
|
||||
setGoodsInfo(goodsInfo);
|
||||
}
|
||||
}else {
|
||||
cl1.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,11 +321,14 @@ public class SecondFragment extends BaseFragment {
|
||||
public void onNext(@NonNull BaseResponse<List<ArticleInfo>> listBaseResponse) {
|
||||
Log.e("getArticle", "onNext: " + listBaseResponse);
|
||||
if (listBaseResponse.code == 200) {
|
||||
cl2.setVisibility(View.VISIBLE);
|
||||
List<ArticleInfo> articleInfos = listBaseResponse.data;
|
||||
if (articleInfos != null && articleInfos.size() != 0) {
|
||||
ArticleInfo articleInfo = articleInfos.get(0);
|
||||
setArticleInfo(articleInfo);
|
||||
}
|
||||
}else {
|
||||
cl2.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user