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 | 3 | import android.content.Context; |
| 4 | 4 | import android.support.v7.widget.LinearLayoutManager; |
| 5 | 5 | import android.support.v7.widget.RecyclerView; |
| 6 | -import android.util.Log; | |
| 6 | +import android.text.TextUtils; | |
| 7 | 7 | import android.view.LayoutInflater; |
| 8 | 8 | import android.view.View; |
| 9 | 9 | import android.view.ViewGroup; |
| ... | ... | @@ -12,7 +12,6 @@ import android.widget.ImageView; |
| 12 | 12 | import android.widget.LinearLayout; |
| 13 | 13 | import android.widget.TextView; |
| 14 | 14 | |
| 15 | -import com.bumptech.glide.Glide; | |
| 16 | 15 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
| 17 | 16 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
| 18 | 17 | import com.shunzhi.parent.AppConfig; |
| ... | ... | @@ -93,8 +92,12 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter<ChannelContextBean |
| 93 | 92 | normal_content.setOnClickListener(new View.OnClickListener() { |
| 94 | 93 | @Override |
| 95 | 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 | 60 | GlideUtils.showImg(this,user_image,url); |
| 61 | 61 | // Glide.with(this).load(url).asBitmap().error(R.drawable.test).centerCrop().into(user_image); |
| 62 | 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 | 65 | user_image.setCornerRadius(20); |
| 67 | 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 | 8 | import android.support.annotation.NonNull; |
| 9 | 9 | import android.support.annotation.Nullable; |
| 10 | 10 | import android.support.design.widget.FloatingActionButton; |
| 11 | +import android.text.TextUtils; | |
| 11 | 12 | import android.view.View; |
| 12 | 13 | import android.widget.ImageView; |
| 13 | 14 | import android.widget.LinearLayout; |
| ... | ... | @@ -16,6 +17,7 @@ import android.widget.TextView; |
| 16 | 17 | import com.share.mvpsdk.base.BasePresenter; |
| 17 | 18 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| 18 | 19 | import com.share.mvpsdk.utils.ToastUtils; |
| 20 | +import com.shunzhi.parent.AppConfig; | |
| 19 | 21 | import com.shunzhi.parent.AppContext; |
| 20 | 22 | import com.shunzhi.parent.R; |
| 21 | 23 | import com.shunzhi.parent.bean.ToolBean; |
| ... | ... | @@ -192,19 +194,34 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
| 192 | 194 | if (toolBeanList.size() > 0) { |
| 193 | 195 | tvCourse1.setText(toolBeanList.get(0).toolName); |
| 194 | 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 | 205 | if (toolBeanList.size() > 1) { |
| 199 | 206 | tvCourse2.setText(toolBeanList.get(1).toolName); |
| 200 | 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 | 216 | if (toolBeanList.size() > 2) { |
| 205 | 217 | tvCourse3.setText(toolBeanList.get(2).toolName); |
| 206 | 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 | 11 | import android.widget.LinearLayout; |
| 12 | 12 | import android.widget.TextView; |
| 13 | 13 | |
| 14 | +import com.bumptech.glide.Glide; | |
| 14 | 15 | import com.makeramen.roundedimageview.RoundedImageView; |
| 15 | 16 | import com.share.mvpsdk.base.BasePresenter; |
| 16 | 17 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| ... | ... | @@ -31,7 +32,7 @@ import com.shunzhi.parent.util.GlideUtils; |
| 31 | 32 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> |
| 32 | 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 | 37 | RoundedImageView user_photo; |
| 37 | 38 | TextView user_name, user_mobile, tvExit, binding_state; |
| ... | ... | @@ -86,7 +87,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 86 | 87 | if (!TextUtils.isEmpty(url)) { |
| 87 | 88 | GlideUtils.showImg(getContext(), user_photo, url); |
| 88 | 89 | } else { |
| 89 | - GlideUtils.showImg(getContext(), user_photo, url); | |
| 90 | + Glide.with(getActivity()).load(R.drawable.defphoto).into(user_photo); | |
| 90 | 91 | user_photo.setCornerRadius(20); |
| 91 | 92 | } |
| 92 | 93 | user_photo.setCornerRadius(20); |
| ... | ... | @@ -100,6 +101,8 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 100 | 101 | |
| 101 | 102 | } else { |
| 102 | 103 | user_name.setVisibility(View.VISIBLE); |
| 104 | + user_name.setText("登录/注册"); | |
| 105 | + Glide.with(getActivity()).load(R.drawable.user_imge_defult).into(user_photo); | |
| 103 | 106 | user_mobile.setVisibility(View.GONE); |
| 104 | 107 | layout_afterLogin.setVisibility(View.GONE); |
| 105 | 108 | tvExit.setVisibility(View.GONE); |
| ... | ... | @@ -107,7 +110,6 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 107 | 110 | } |
| 108 | 111 | |
| 109 | 112 | |
| 110 | - | |
| 111 | 113 | @Override |
| 112 | 114 | public void onClick(View v) { |
| 113 | 115 | switch (v.getId()) { |
| ... | ... | @@ -185,7 +187,7 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract |
| 185 | 187 | AppConfig.ISLOGIN = false; |
| 186 | 188 | setPersonInfo(); |
| 187 | 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 | 48 | android:textColor="@color/textColor" |
| 49 | 49 | android:textSize="@dimen/textSize16" /> |
| 50 | 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 | 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 | 61 | android:textSize="@dimen/size_dp_16" |
| 56 | 62 | android:textColor="@color/xueqing_blue" |
| 57 | - android:text="敬请期待" | |
| 58 | - android:gravity="center" | |
| 63 | + android:background="@drawable/baogao_back" | |
| 59 | 64 | android:lineSpacingExtra="@dimen/size_dp_5" |
| 60 | 65 | android:id="@+id/tvNoData" |
| 61 | 66 | /> |
| 62 | - | |
| 67 | +</RelativeLayout> | |
| 63 | 68 | <LinearLayout |
| 64 | 69 | android:layout_width="match_parent" |
| 65 | 70 | android:layout_height="match_parent" | ... | ... |