Commit ce0a88ea90f4de52fdde5a37ad915bf5b0794964
Exists in
yxb_dev
and in
2 other branches
Merge branch 'yxb_dev' of http://git.shunzhi.net/taohd/parentwork into developer
Showing
1 changed file
with
29 additions
and
21 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
| ... | ... | @@ -10,6 +10,7 @@ import android.support.annotation.Nullable; |
| 10 | 10 | import android.support.design.widget.FloatingActionButton; |
| 11 | 11 | import android.text.TextUtils; |
| 12 | 12 | import android.view.View; |
| 13 | +import android.widget.FrameLayout; | |
| 13 | 14 | import android.widget.ImageView; |
| 14 | 15 | import android.widget.LinearLayout; |
| 15 | 16 | import android.widget.TextView; |
| ... | ... | @@ -47,6 +48,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
| 47 | 48 | LinearLayout layout_control; |
| 48 | 49 | |
| 49 | 50 | CityPicker cityPicker = null; |
| 51 | + FrameLayout frame_zxxl, frame_xqjc; | |
| 50 | 52 | |
| 51 | 53 | @Override |
| 52 | 54 | public int getLayoutId() { |
| ... | ... | @@ -55,7 +57,10 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
| 55 | 57 | |
| 56 | 58 | @Override |
| 57 | 59 | public void initUI(View view, @Nullable Bundle savedInstanceState) { |
| 58 | - | |
| 60 | + frame_xqjc = view.findViewById(R.id.frame_xqjc); | |
| 61 | + frame_xqjc.setOnClickListener(this); | |
| 62 | + frame_zxxl = view.findViewById(R.id.frame_zxxl); | |
| 63 | + frame_zxxl.setOnClickListener(this); | |
| 59 | 64 | ivCamera = view.findViewById(R.id.ivCamera); |
| 60 | 65 | tvLocalAddress = view.findViewById(R.id.tvLocalAddress); |
| 61 | 66 | textAndImg_xqjc = view.findViewById(R.id.textAndImg_xqjc); |
| ... | ... | @@ -94,7 +99,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
| 94 | 99 | |
| 95 | 100 | private void addTools(String districtName) { |
| 96 | 101 | layout_control.measure(0, 0); |
| 97 | - mPresenter.getTools(layout_control,districtName ); | |
| 102 | + mPresenter.getTools(layout_control, districtName); | |
| 98 | 103 | |
| 99 | 104 | } |
| 100 | 105 | |
| ... | ... | @@ -152,10 +157,10 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
| 152 | 157 | case R.id.ivCamera: |
| 153 | 158 | ToastUtils.showToast("功能暂不开放"); |
| 154 | 159 | break; |
| 155 | - case R.id.textAndImg_xqjc: | |
| 160 | + case R.id.frame_xqjc: | |
| 156 | 161 | ToastUtils.showToast("功能暂不开放"); |
| 157 | 162 | break; |
| 158 | - case R.id.textAndImg_zxlx: | |
| 163 | + case R.id.frame_zxxl: | |
| 159 | 164 | ToastUtils.showToast("功能暂不开放"); |
| 160 | 165 | break; |
| 161 | 166 | default: |
| ... | ... | @@ -192,7 +197,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
| 192 | 197 | public void showTools(List<ToolBean> toolBeanList) { |
| 193 | 198 | if (toolBeanList.size() > 0) { |
| 194 | 199 | tvCourse1.setText(toolBeanList.get(0).toolName); |
| 195 | - GlideUtils.showImgWithDefaule(getActivity(), ivCourse1, toolBeanList.get(0).toolImage,R.drawable.activite1); | |
| 200 | + GlideUtils.showImgWithDefaule(getActivity(), ivCourse1, toolBeanList.get(0).toolImage, R.drawable.activite1); | |
| 196 | 201 | if (TextUtils.isEmpty(toolBeanList.get(0).toolUrl)) { |
| 197 | 202 | tvCourse1.setTag(AppConfig.BASE_URL_ORDER |
| 198 | 203 | + "InformationDetail.aspx?id=" + toolBeanList.get(0).toolId + "&areaname=" + AppContext.getInstance().district); |
| ... | ... | @@ -203,28 +208,31 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP |
| 203 | 208 | |
| 204 | 209 | if (toolBeanList.size() > 1) { |
| 205 | 210 | tvCourse2.setText(toolBeanList.get(1).toolName); |
| 206 | - GlideUtils.showImgWithDefaule(getActivity(), ivCourse2, toolBeanList.get(1).toolImage,R.drawable.activite2); | |
| 211 | + GlideUtils.showImgWithDefaule(getActivity(), ivCourse2, toolBeanList.get(1).toolImage, R.drawable.activite2); | |
| 207 | 212 | if (TextUtils.isEmpty(toolBeanList.get(1).toolUrl)) { |
| 208 | - tvCourse1.setTag(AppConfig.BASE_URL_ORDER | |
| 209 | - + "InformationDetail.aspx?id=" + toolBeanList.get(1).toolId + "&areaname=" + AppContext.getInstance().district); | |
| 210 | - } else { | |
| 211 | - tvCourse1.setTag(toolBeanList.get(1).toolUrl); | |
| 212 | - } | |
| 213 | + tvCourse2.setTag(AppConfig.BASE_URL_ORDER | |
| 214 | + + "InformationDetail.aspx?id=" + toolBeanList.get(1).toolId + "&areaname=" + AppContext.getInstance().district); | |
| 215 | + } else { | |
| 216 | + tvCourse2.setTag(toolBeanList.get(1).toolUrl); | |
| 213 | 217 | } |
| 218 | + } | |
| 214 | 219 | |
| 215 | - if (toolBeanList.size() > 2) { | |
| 216 | - tvCourse3.setText(toolBeanList.get(2).toolName); | |
| 217 | - GlideUtils.showImgWithDefaule(getActivity(), ivCourse3, toolBeanList.get(2).toolImage,R.drawable.activite3); | |
| 218 | - if (TextUtils.isEmpty(toolBeanList.get(2).toolUrl)) { | |
| 219 | - tvCourse1.setTag(AppConfig.BASE_URL_ORDER | |
| 220 | - + "InformationDetail.aspx?id=" + toolBeanList.get(2).toolId + "&areaname=" + AppContext.getInstance().district); | |
| 221 | - } else { | |
| 222 | - tvCourse1.setTag(toolBeanList.get(2).toolUrl); | |
| 223 | - } | |
| 220 | + if(toolBeanList.size()>2) | |
| 221 | + | |
| 222 | + { | |
| 223 | + tvCourse3.setText(toolBeanList.get(2).toolName); | |
| 224 | + GlideUtils.showImgWithDefaule(getActivity(), ivCourse3, toolBeanList.get(2).toolImage, R.drawable.activite3); | |
| 225 | + if (TextUtils.isEmpty(toolBeanList.get(2).toolUrl)) { | |
| 226 | + tvCourse3.setTag(AppConfig.BASE_URL_ORDER | |
| 227 | + + "InformationDetail.aspx?id=" + toolBeanList.get(2).toolId + "&areaname=" + AppContext.getInstance().district); | |
| 228 | + } else { | |
| 229 | + tvCourse3.setTag(toolBeanList.get(2).toolUrl); | |
| 224 | 230 | } |
| 225 | 231 | } |
| 226 | 232 | |
| 227 | - public void refresh(){ | |
| 233 | +} | |
| 234 | + | |
| 235 | + public void refresh() { | |
| 228 | 236 | addTools(AppContext.getInstance().district); |
| 229 | 237 | } |
| 230 | 238 | } | ... | ... |