Commit 3305740f5b7d2a5f82bf57ed5deffb9b0967d87d
Exists in
yxb_dev
and in
2 other branches
no message
Showing
6 changed files
with
44 additions
and
18 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/adapter/MyConsultAdapter.java
| @@ -3,7 +3,7 @@ package com.shunzhi.parent.adapter; | @@ -3,7 +3,7 @@ package com.shunzhi.parent.adapter; | ||
| 3 | import android.content.Context; | 3 | import android.content.Context; |
| 4 | import android.support.v7.widget.LinearLayoutManager; | 4 | import android.support.v7.widget.LinearLayoutManager; |
| 5 | import android.support.v7.widget.RecyclerView; | 5 | import android.support.v7.widget.RecyclerView; |
| 6 | -import android.util.Log; | 6 | +import android.text.TextUtils; |
| 7 | import android.view.LayoutInflater; | 7 | import android.view.LayoutInflater; |
| 8 | import android.view.View; | 8 | import android.view.View; |
| 9 | import android.view.ViewGroup; | 9 | import android.view.ViewGroup; |
| @@ -12,7 +12,6 @@ import android.widget.ImageView; | @@ -12,7 +12,6 @@ import android.widget.ImageView; | ||
| 12 | import android.widget.LinearLayout; | 12 | import android.widget.LinearLayout; |
| 13 | import android.widget.TextView; | 13 | import android.widget.TextView; |
| 14 | 14 | ||
| 15 | -import com.bumptech.glide.Glide; | ||
| 16 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | 15 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
| 17 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | 16 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
| 18 | import com.shunzhi.parent.AppConfig; | 17 | import com.shunzhi.parent.AppConfig; |
| @@ -93,8 +92,12 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean | @@ -93,8 +92,12 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean | ||
| 93 | normal_content.setOnClickListener(new View.OnClickListener() { | 92 | normal_content.setOnClickListener(new View.OnClickListener() { |
| 94 | @Override | 93 | @Override |
| 95 | public void onClick(View v) { | 94 | public void onClick(View v) { |
| 96 | - WebViewActivity.getInstance(mContext, AppConfig.BASE_URL_ORDER | ||
| 97 | - +"InformationDetail.aspx?id="+object.getId()+"&areaname="+ AppContext.getInstance().district, -1); | 95 | + if(TextUtils.isEmpty(object.getUrl())) { |
| 96 | + WebViewActivity.getInstance(mContext, AppConfig.BASE_URL_ORDER | ||
| 97 | + + "InformationDetail.aspx?id=" + object.getId() + "&areaname=" + AppContext.getInstance().district, -1); | ||
| 98 | + }else{ | ||
| 99 | + WebViewActivity.getInstance(mContext, object.getUrl(), -1); | ||
| 100 | + } | ||
| 98 | } | 101 | } |
| 99 | }); | 102 | }); |
| 100 | } | 103 | } |
app/src/main/java/com/shunzhi/parent/ui/activity/PersonInfoActivity.java
| @@ -60,8 +60,7 @@ public class PersonInfoActivity extends BaseMVPCompatActivity<PersonInfoContract | @@ -60,8 +60,7 @@ public class PersonInfoActivity extends BaseMVPCompatActivity<PersonInfoContract | ||
| 60 | GlideUtils.showImg(this,user_image,url); | 60 | GlideUtils.showImg(this,user_image,url); |
| 61 | // Glide.with(this).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_image); | 61 | // Glide.with(this).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_image); |
| 62 | } else { | 62 | } else { |
| 63 | -// Glide.with(this).load(R.drawable.test).centerCrop().into(user_image); | ||
| 64 | - GlideUtils.showImg(this,user_image,url); | 63 | + Glide.with(this).load(R.drawable.defphoto).centerCrop().into(user_image); |
| 65 | } | 64 | } |
| 66 | user_image.setCornerRadius(20); | 65 | user_image.setCornerRadius(20); |
| 67 | user_image.setOval(true); | 66 | user_image.setOval(true); |
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
| @@ -8,6 +8,7 @@ import android.os.Bundle; | @@ -8,6 +8,7 @@ import android.os.Bundle; | ||
| 8 | import android.support.annotation.NonNull; | 8 | import android.support.annotation.NonNull; |
| 9 | import android.support.annotation.Nullable; | 9 | import android.support.annotation.Nullable; |
| 10 | import android.support.design.widget.FloatingActionButton; | 10 | import android.support.design.widget.FloatingActionButton; |
| 11 | +import android.text.TextUtils; | ||
| 11 | import android.view.View; | 12 | import android.view.View; |
| 12 | import android.widget.ImageView; | 13 | import android.widget.ImageView; |
| 13 | import android.widget.LinearLayout; | 14 | import android.widget.LinearLayout; |
| @@ -16,6 +17,7 @@ import android.widget.TextView; | @@ -16,6 +17,7 @@ import android.widget.TextView; | ||
| 16 | import com.share.mvpsdk.base.BasePresenter; | 17 | import com.share.mvpsdk.base.BasePresenter; |
| 17 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | 18 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| 18 | import com.share.mvpsdk.utils.ToastUtils; | 19 | import com.share.mvpsdk.utils.ToastUtils; |
| 20 | +import com.shunzhi.parent.AppConfig; | ||
| 19 | import com.shunzhi.parent.AppContext; | 21 | import com.shunzhi.parent.AppContext; |
| 20 | import com.shunzhi.parent.R; | 22 | import com.shunzhi.parent.R; |
| 21 | import com.shunzhi.parent.bean.ToolBean; | 23 | import com.shunzhi.parent.bean.ToolBean; |
| @@ -192,19 +194,34 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -192,19 +194,34 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
| 192 | if (toolBeanList.size() > 0) { | 194 | if (toolBeanList.size() > 0) { |
| 193 | tvCourse1.setText(toolBeanList.get(0).toolName); | 195 | tvCourse1.setText(toolBeanList.get(0).toolName); |
| 194 | GlideUtils.showImg(getActivity(), ivCourse1, toolBeanList.get(0).toolImage); | 196 | GlideUtils.showImg(getActivity(), ivCourse1, toolBeanList.get(0).toolImage); |
| 195 | - tvCourse1.setTag(toolBeanList.get(0).toolUrl); | 197 | + if (TextUtils.isEmpty(toolBeanList.get(0).toolUrl)) { |
| 198 | + tvCourse1.setTag(AppConfig.BASE_URL_ORDER | ||
| 199 | + + "InformationDetail.aspx?id=" + toolBeanList.get(0).toolId + "&areaname=" + AppContext.getInstance().district); | ||
| 200 | + } else { | ||
| 201 | + tvCourse1.setTag(toolBeanList.get(0).toolUrl); | ||
| 202 | + } | ||
| 196 | } | 203 | } |
| 197 | 204 | ||
| 198 | if (toolBeanList.size() > 1) { | 205 | if (toolBeanList.size() > 1) { |
| 199 | tvCourse2.setText(toolBeanList.get(1).toolName); | 206 | tvCourse2.setText(toolBeanList.get(1).toolName); |
| 200 | GlideUtils.showImg(getActivity(), ivCourse2, toolBeanList.get(1).toolImage); | 207 | GlideUtils.showImg(getActivity(), ivCourse2, toolBeanList.get(1).toolImage); |
| 201 | - tvCourse2.setTag(toolBeanList.get(1).toolUrl); | 208 | + if (TextUtils.isEmpty(toolBeanList.get(1).toolUrl)) { |
| 209 | + tvCourse1.setTag(AppConfig.BASE_URL_ORDER | ||
| 210 | + + "InformationDetail.aspx?id=" + toolBeanList.get(1).toolId + "&areaname=" + AppContext.getInstance().district); | ||
| 211 | + } else { | ||
| 212 | + tvCourse1.setTag(toolBeanList.get(1).toolUrl); | ||
| 213 | + } | ||
| 202 | } | 214 | } |
| 203 | 215 | ||
| 204 | if (toolBeanList.size() > 2) { | 216 | if (toolBeanList.size() > 2) { |
| 205 | tvCourse3.setText(toolBeanList.get(2).toolName); | 217 | tvCourse3.setText(toolBeanList.get(2).toolName); |
| 206 | GlideUtils.showImg(getActivity(), ivCourse3, toolBeanList.get(2).toolImage); | 218 | GlideUtils.showImg(getActivity(), ivCourse3, toolBeanList.get(2).toolImage); |
| 207 | - tvCourse3.setTag(toolBeanList.get(2).toolUrl); | 219 | + if (TextUtils.isEmpty(toolBeanList.get(2).toolUrl)) { |
| 220 | + tvCourse1.setTag(AppConfig.BASE_URL_ORDER | ||
| 221 | + + "InformationDetail.aspx?id=" + toolBeanList.get(2).toolId + "&areaname=" + AppContext.getInstance().district); | ||
| 222 | + } else { | ||
| 223 | + tvCourse1.setTag(toolBeanList.get(2).toolUrl); | ||
| 224 | + } | ||
| 208 | } | 225 | } |
| 209 | } | 226 | } |
| 210 | 227 |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
| @@ -11,6 +11,7 @@ import android.view.View; | @@ -11,6 +11,7 @@ import android.view.View; | ||
| 11 | import android.widget.LinearLayout; | 11 | import android.widget.LinearLayout; |
| 12 | import android.widget.TextView; | 12 | import android.widget.TextView; |
| 13 | 13 | ||
| 14 | +import com.bumptech.glide.Glide; | ||
| 14 | import com.makeramen.roundedimageview.RoundedImageView; | 15 | import com.makeramen.roundedimageview.RoundedImageView; |
| 15 | import com.share.mvpsdk.base.BasePresenter; | 16 | import com.share.mvpsdk.base.BasePresenter; |
| 16 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | 17 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| @@ -31,7 +32,7 @@ import com.shunzhi.parent.util.GlideUtils; | @@ -31,7 +32,7 @@ import com.shunzhi.parent.util.GlideUtils; | ||
| 31 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> | 32 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> |
| 32 | implements MineContract.IMineView, View.OnClickListener { | 33 | implements MineContract.IMineView, View.OnClickListener { |
| 33 | 34 | ||
| 34 | - LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about, layout_feedback,top_layout,layout_afterLogin; | 35 | + LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about, layout_feedback, top_layout, layout_afterLogin; |
| 35 | 36 | ||
| 36 | RoundedImageView user_photo; | 37 | RoundedImageView user_photo; |
| 37 | TextView user_name, user_mobile, tvExit, binding_state; | 38 | TextView user_name, user_mobile, tvExit, binding_state; |
| @@ -86,7 +87,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -86,7 +87,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
| 86 | if (!TextUtils.isEmpty(url)) { | 87 | if (!TextUtils.isEmpty(url)) { |
| 87 | GlideUtils.showImg(getContext(), user_photo, url); | 88 | GlideUtils.showImg(getContext(), user_photo, url); |
| 88 | } else { | 89 | } else { |
| 89 | - GlideUtils.showImg(getContext(), user_photo, url); | 90 | + Glide.with(getActivity()).load(R.drawable.defphoto).into(user_photo); |
| 90 | user_photo.setCornerRadius(20); | 91 | user_photo.setCornerRadius(20); |
| 91 | } | 92 | } |
| 92 | user_photo.setCornerRadius(20); | 93 | user_photo.setCornerRadius(20); |
| @@ -100,6 +101,8 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -100,6 +101,8 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
| 100 | 101 | ||
| 101 | } else { | 102 | } else { |
| 102 | user_name.setVisibility(View.VISIBLE); | 103 | user_name.setVisibility(View.VISIBLE); |
| 104 | + user_name.setText("登录/注册"); | ||
| 105 | + Glide.with(getActivity()).load(R.drawable.user_imge_defult).into(user_photo); | ||
| 103 | user_mobile.setVisibility(View.GONE); | 106 | user_mobile.setVisibility(View.GONE); |
| 104 | layout_afterLogin.setVisibility(View.GONE); | 107 | layout_afterLogin.setVisibility(View.GONE); |
| 105 | tvExit.setVisibility(View.GONE); | 108 | tvExit.setVisibility(View.GONE); |
| @@ -107,7 +110,6 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -107,7 +110,6 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
| 107 | } | 110 | } |
| 108 | 111 | ||
| 109 | 112 | ||
| 110 | - | ||
| 111 | @Override | 113 | @Override |
| 112 | public void onClick(View v) { | 114 | public void onClick(View v) { |
| 113 | switch (v.getId()) { | 115 | switch (v.getId()) { |
| @@ -185,7 +187,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -185,7 +187,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
| 185 | AppConfig.ISLOGIN = false; | 187 | AppConfig.ISLOGIN = false; |
| 186 | setPersonInfo(); | 188 | setPersonInfo(); |
| 187 | startActivity(new Intent().putExtra("type", "登录").setClass(getActivity(), LoginAndRegistActivity.class)); | 189 | startActivity(new Intent().putExtra("type", "登录").setClass(getActivity(), LoginAndRegistActivity.class)); |
| 188 | - getActivity().finish(); | 190 | +// getActivity().finish(); |
| 189 | } | 191 | } |
| 190 | } | 192 | } |
| 191 | 193 |
8.63 KB
app/src/main/res/layout/fragment_report.xml
| @@ -48,18 +48,23 @@ | @@ -48,18 +48,23 @@ | ||
| 48 | android:textColor="@color/textColor" | 48 | android:textColor="@color/textColor" |
| 49 | android:textSize="@dimen/textSize16" /> | 49 | android:textSize="@dimen/textSize16" /> |
| 50 | </LinearLayout> | 50 | </LinearLayout> |
| 51 | +<RelativeLayout | ||
| 52 | + android:layout_width="match_parent" | ||
| 53 | + android:layout_height="match_parent" | ||
| 54 | + android:background="@color/white" | ||
| 51 | 55 | ||
| 56 | + > | ||
| 52 | <TextView | 57 | <TextView |
| 53 | - android:layout_width="match_parent" | ||
| 54 | - android:layout_height="match_parent" | 58 | + android:layout_width="wrap_content" |
| 59 | + android:layout_height="wrap_content" | ||
| 60 | + android:layout_centerInParent="true" | ||
| 55 | android:textSize="@dimen/size_dp_16" | 61 | android:textSize="@dimen/size_dp_16" |
| 56 | android:textColor="@color/xueqing_blue" | 62 | android:textColor="@color/xueqing_blue" |
| 57 | - android:text="敬请期待" | ||
| 58 | - android:gravity="center" | 63 | + android:background="@drawable/baogao_back" |
| 59 | android:lineSpacingExtra="@dimen/size_dp_5" | 64 | android:lineSpacingExtra="@dimen/size_dp_5" |
| 60 | android:id="@+id/tvNoData" | 65 | android:id="@+id/tvNoData" |
| 61 | /> | 66 | /> |
| 62 | - | 67 | +</RelativeLayout> |
| 63 | <LinearLayout | 68 | <LinearLayout |
| 64 | android:layout_width="match_parent" | 69 | android:layout_width="match_parent" |
| 65 | android:layout_height="match_parent" | 70 | android:layout_height="match_parent" |