完善个人资料,
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())
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="58dp"
|
||||
android:layout_height="63dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_width="41dp"
|
||||
android:layout_height="41dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="9dp"
|
||||
android:scaleType="fitCenter" />
|
||||
@@ -27,17 +27,6 @@
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_toEndOf="@id/icon"
|
||||
android:text="赠送送玫瑰 (5/5)"
|
||||
android:textColor="#9A9A9A"
|
||||
android:textSize="10sp" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/to_receive_layout"
|
||||
@@ -59,5 +48,18 @@
|
||||
android:textSize="12sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_toLeftOf="@id/to_receive_layout"
|
||||
android:layout_toEndOf="@id/icon"
|
||||
android:text="赠送送玫瑰 (5/5)"
|
||||
android:textColor="#9A9A9A"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user