完善个人资料,
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -48,12 +49,22 @@ public class DrawerTaskAdapter extends RecyclerView.Adapter {
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 2;
|
||||
if (child.size()>3){
|
||||
return 3;
|
||||
}else {
|
||||
return child.size();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||
child.clear();
|
||||
child.addAll(mChild);
|
||||
// for (CustomSidebarChildModel childModel : mChild) {
|
||||
// if (TextUtils.equals("1", childModel.getIsShow())) {
|
||||
// child.add(childModel);
|
||||
// }
|
||||
// }
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,18 @@ public class CustomSidebarChildModel extends BaseModel {
|
||||
@SerializedName("activity_id")
|
||||
private String activityId;
|
||||
@SerializedName("flag")
|
||||
private String flag;
|
||||
private String flag = "";
|
||||
@SerializedName("is_show")
|
||||
private String isShow;
|
||||
|
||||
public String getIsShow() {
|
||||
return isShow;
|
||||
}
|
||||
|
||||
public CustomSidebarChildModel setIsShow(String isShow) {
|
||||
this.isShow = isShow;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
|
||||
@@ -55,16 +55,22 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
||||
case "illumine":
|
||||
iconImg = R.mipmap.icon_052x;
|
||||
break;
|
||||
default:
|
||||
iconImg = R.mipmap.icon_012x;
|
||||
break;
|
||||
}
|
||||
ImgLoader.display(itemView.getContext(), iconImg, icon);
|
||||
StringBuffer titleBuffer = new StringBuffer();
|
||||
titleBuffer
|
||||
.append(model.getTitle())
|
||||
.append("(")
|
||||
.append(model.getNowNum())
|
||||
.append("/")
|
||||
.append(model.getNeedNum())
|
||||
.append(")");
|
||||
.append(model.getTitle());
|
||||
if (!TextUtils.isEmpty(model.getNowNum())) {
|
||||
titleBuffer.append("(")
|
||||
.append(model.getNowNum())
|
||||
.append("/")
|
||||
.append(model.getNeedNum())
|
||||
.append(")");
|
||||
}
|
||||
|
||||
title.setText(titleBuffer.toString());
|
||||
subtitle.setText(model.getSubtitle());
|
||||
if (TextUtils.equals(model.getStatus(), "0")) {
|
||||
@@ -100,7 +106,7 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show( R.string.net_error);
|
||||
ToastUtil.show(R.string.net_error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -65,7 +65,7 @@ public class DrawerTaskViewHolder extends RecyclerView.ViewHolder {
|
||||
.append(userInfo.getId())
|
||||
.append("&token=")
|
||||
.append(userInfo.getToken());
|
||||
}
|
||||
}//资料
|
||||
Bus.get().post(new CustomDrawerPopupEvent()
|
||||
.setDisMiss(true)
|
||||
.setHtmlUrl(htmlUrl.toString())
|
||||
|
||||
Reference in New Issue
Block a user