diff --git a/common/src/main/java/com/yunbao/common/adapter/DrawerTaskAdapter.java b/common/src/main/java/com/yunbao/common/adapter/DrawerTaskAdapter.java index d3b0acc79..8d96b30fc 100644 --- a/common/src/main/java/com/yunbao/common/adapter/DrawerTaskAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/DrawerTaskAdapter.java @@ -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 mChild) { child.clear(); child.addAll(mChild); +// for (CustomSidebarChildModel childModel : mChild) { +// if (TextUtils.equals("1", childModel.getIsShow())) { +// child.add(childModel); +// } +// } notifyDataSetChanged(); } } diff --git a/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java b/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java index e4cb4fc15..481f17600 100644 --- a/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java +++ b/common/src/main/java/com/yunbao/common/bean/CustomSidebarChildModel.java @@ -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; diff --git a/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java index 5da6b3b3f..6d99a15ff 100644 --- a/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java @@ -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 { diff --git a/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java index d34fe9c1e..a14df77ad 100644 --- a/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java @@ -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()) diff --git a/common/src/main/res/layout/view_tsak_center_child.xml b/common/src/main/res/layout/view_tsak_center_child.xml index cec5c9451..987063fdb 100644 --- a/common/src/main/res/layout/view_tsak_center_child.xml +++ b/common/src/main/res/layout/view_tsak_center_child.xml @@ -2,7 +2,7 @@ @@ -27,17 +27,6 @@ android:textColor="#FFFFFF" android:textSize="14sp" /> - + \ No newline at end of file diff --git a/config.gradle b/config.gradle index 2d4dd7c75..f3ad9d81e 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", // 测试 -// serverHost : "https://ceshi.yaoulive.com", + serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", @@ -24,7 +24,7 @@ ext { baiduAppKey : "zgCgFhUKEOV7I3ZXDFpTfnRB", baiduAppSecretKey: "nEVSgmuGpU0pjPr6VleEGGAl0hzGW52S", // true表示谷歌支付 false - isGooglePlay : false, + isGooglePlay : true, //是否上报异常日志 isUploadLog : true ] diff --git a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java index 9bc42717f..90e130428 100644 --- a/main/src/main/java/com/yunbao/main/activity/LoginActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LoginActivity.java @@ -38,6 +38,7 @@ import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LoginData; import com.yunbao.common.bean.UserAreaBean; import com.yunbao.common.bean.UserBean; +import com.yunbao.common.fragment.LoadingDialog; import com.yunbao.common.http.CommonHttpConsts; import com.yunbao.common.http.CommonHttpUtil; import com.yunbao.common.http.HttpCallback; @@ -208,11 +209,14 @@ public class LoginActivity extends AbsActivity { } mLoginType = Constants.MOB_PHONE; String uuid = DeviceUtils.getUniqueDeviceId(); - + LoadingDialog loadingDialog = new LoadingDialog(); + loadingDialog.show(getSupportFragmentManager(), "LoadingDialog"); + loadingDialog.setShowText(getString(R.string.login_ing)); MainHttpUtil.login(phoneNum, pwd, uuid, new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { onLoginSuccess(code, msg, info); + loadingDialog.dismiss(); } }); hideKeyboard(mEditPwd);