Commit ae9a2c2f0971b34b6f1c643ca95a304ed3bcd193
Exists in
yxb_dev
and in
2 other branches
no message
Showing
8 changed files
with
58 additions
and
33 deletions
 
Show diff stats
app/src/main/java/com/shunzhi/parent/ui/activity/LoginAndRegistActivity.java
| 1 | 1 | package com.shunzhi.parent.ui.activity; | 
| 2 | 2 | |
| 3 | 3 | import android.os.Bundle; | 
| 4 | -import android.util.Log; | |
| 5 | 4 | |
| 6 | 5 | import com.share.mvpsdk.base.activity.BaseCompatActivity; | 
| 7 | 6 | import com.shunzhi.parent.R; | 
| ... | ... | @@ -23,7 +22,6 @@ public class LoginAndRegistActivity extends BaseCompatActivity { | 
| 23 | 22 | mFragments[0] = LoginAndRegistFragment.getInstance(type); | 
| 24 | 23 | loadRootFragment(R.id.frame, mFragments[0]); | 
| 25 | 24 | } | 
| 26 | - | |
| 27 | 25 | } else { | 
| 28 | 26 | mFragments[0] = findFragment(LoginAndRegistFragment.class); | 
| 29 | 27 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
| ... | ... | @@ -13,7 +13,6 @@ import android.widget.ImageView; | 
| 13 | 13 | import android.widget.LinearLayout; | 
| 14 | 14 | import android.widget.TextView; | 
| 15 | 15 | |
| 16 | -import com.bumptech.glide.Glide; | |
| 17 | 16 | import com.share.mvpsdk.base.BasePresenter; | 
| 18 | 17 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | 
| 19 | 18 | import com.share.mvpsdk.utils.ToastUtils; | 
| ... | ... | @@ -74,11 +73,13 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | 
| 74 | 73 | textAndImg_xqjc.setTextColor(R.color.white); | 
| 75 | 74 | textAndImg_xqjc.setText("学情检测"); | 
| 76 | 75 | textAndImg_xqjc.setImgs(R.drawable.xqjc, R.drawable.xqjc); | 
| 76 | + textAndImg_xqjc.setOnClickListener(this); | |
| 77 | 77 | textAndImg_xqjc.setSelect(true); | 
| 78 | 78 | |
| 79 | 79 | textAndImg_zxlx.setText("专项训练"); | 
| 80 | 80 | textAndImg_zxlx.setTextColor(R.color.white); | 
| 81 | 81 | textAndImg_zxlx.setImgs(R.drawable.zxlx, R.drawable.zxlx); | 
| 82 | + textAndImg_zxlx.setOnClickListener(this); | |
| 82 | 83 | textAndImg_zxlx.setSelect(true); | 
| 83 | 84 | |
| 84 | 85 | initListeners(view); | 
| ... | ... | @@ -92,7 +93,7 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | 
| 92 | 93 | |
| 93 | 94 | private void addTools() { | 
| 94 | 95 | layout_control.measure(0, 0); | 
| 95 | - mPresenter.getTools(layout_control, AppContext.getInstance().district); | |
| 96 | + mPresenter.getTools(layout_control, "余杭区"); | |
| 96 | 97 | |
| 97 | 98 | } | 
| 98 | 99 | |
| ... | ... | @@ -100,8 +101,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | 
| 100 | 101 | public void onResume() { | 
| 101 | 102 | super.onResume(); | 
| 102 | 103 | // if (!tvLocalAddress.getText().toString().equals(AppContext.getInstance().cityName)){ | 
| 103 | - tvLocalAddress.setText(AppContext.getInstance().district); | |
| 104 | - addTools(); | |
| 104 | + tvLocalAddress.setText(AppContext.getInstance().district); | |
| 105 | + addTools(); | |
| 105 | 106 | // } | 
| 106 | 107 | } | 
| 107 | 108 | |
| ... | ... | @@ -133,16 +134,16 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | 
| 133 | 134 | public void onClick(View view) { | 
| 134 | 135 | switch (view.getId()) { | 
| 135 | 136 | case R.id.frame_hot1://热门课程 | 
| 136 | - if (tvCourse1.getTag()!=null) | |
| 137 | - WebViewActivity.getInstance(getActivity(),tvCourse1.getTag().toString(),-1); | |
| 137 | + if (tvCourse1.getTag() != null) | |
| 138 | + WebViewActivity.getInstance(getActivity(), tvCourse1.getTag().toString(), -1); | |
| 138 | 139 | break; | 
| 139 | 140 | case R.id.frame_hot2: | 
| 140 | - if (tvCourse2.getTag()!=null) | |
| 141 | - WebViewActivity.getInstance(getActivity(),tvCourse2.getTag().toString(),-1); | |
| 141 | + if (tvCourse2.getTag() != null) | |
| 142 | + WebViewActivity.getInstance(getActivity(), tvCourse2.getTag().toString(), -1); | |
| 142 | 143 | break; | 
| 143 | 144 | case R.id.frame_hot3: | 
| 144 | - if (tvCourse3.getTag()!=null) | |
| 145 | - WebViewActivity.getInstance(getActivity(),tvCourse3.getTag().toString(),-1); | |
| 145 | + if (tvCourse3.getTag() != null) | |
| 146 | + WebViewActivity.getInstance(getActivity(), tvCourse3.getTag().toString(), -1); | |
| 146 | 147 | break; | 
| 147 | 148 | case R.id.tvLocalAddress: | 
| 148 | 149 | // AppContext.getInstance().startLocation(); | 
| ... | ... | @@ -153,6 +154,14 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | 
| 153 | 154 | case R.id.ivCamera: | 
| 154 | 155 | ToastUtils.showToast("功能暂未上线"); | 
| 155 | 156 | break; | 
| 157 | + case R.id.textAndImg_xqjc: | |
| 158 | + ToastUtils.showToast("功能暂未上线"); | |
| 159 | + break; | |
| 160 | + case R.id.textAndImg_zxlx: | |
| 161 | + ToastUtils.showToast("功能暂未上线"); | |
| 162 | + break; | |
| 163 | + default: | |
| 164 | + break; | |
| 156 | 165 | } | 
| 157 | 166 | } | 
| 158 | 167 | |
| ... | ... | @@ -176,27 +185,27 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | 
| 176 | 185 | public void getCity(String name) { | 
| 177 | 186 | tvLocalAddress.setText(name.split(" ")[2]); | 
| 178 | 187 | mPresenter.getTools(layout_control, name.split(" ")[2]); | 
| 179 | - AppContext.getInstance().cityName=name.split(" ")[1]; | |
| 180 | - AppContext.getInstance().district=name.split(" ")[2]; | |
| 188 | + AppContext.getInstance().cityName = name.split(" ")[1]; | |
| 189 | + AppContext.getInstance().district = name.split(" ")[2]; | |
| 181 | 190 | } | 
| 182 | 191 | |
| 183 | 192 | @Override | 
| 184 | 193 | public void showTools(List<ToolBean> toolBeanList) { | 
| 185 | 194 | if (toolBeanList.size() > 0) { | 
| 186 | 195 | tvCourse1.setText(toolBeanList.get(0).toolName); | 
| 187 | - GlideUtils.showImg(getActivity(),ivCourse1,toolBeanList.get(0).toolImage); | |
| 196 | + GlideUtils.showImg(getActivity(), ivCourse1, toolBeanList.get(0).toolImage); | |
| 188 | 197 | tvCourse1.setTag(toolBeanList.get(0).toolUrl); | 
| 189 | 198 | } | 
| 190 | 199 | |
| 191 | 200 | if (toolBeanList.size() > 1) { | 
| 192 | 201 | tvCourse2.setText(toolBeanList.get(1).toolName); | 
| 193 | - GlideUtils.showImg(getActivity(),ivCourse2,toolBeanList.get(1).toolImage); | |
| 202 | + GlideUtils.showImg(getActivity(), ivCourse2, toolBeanList.get(1).toolImage); | |
| 194 | 203 | tvCourse2.setTag(toolBeanList.get(1).toolUrl); | 
| 195 | 204 | } | 
| 196 | 205 | |
| 197 | 206 | if (toolBeanList.size() > 2) { | 
| 198 | 207 | tvCourse3.setText(toolBeanList.get(2).toolName); | 
| 199 | - GlideUtils.showImg(getActivity(),ivCourse3,toolBeanList.get(2).toolImage); | |
| 208 | + GlideUtils.showImg(getActivity(), ivCourse3, toolBeanList.get(2).toolImage); | |
| 200 | 209 | tvCourse3.setTag(toolBeanList.get(2).toolUrl); | 
| 201 | 210 | } | 
| 202 | 211 | } | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
| ... | ... | @@ -30,7 +30,9 @@ import com.shunzhi.parent.util.GlideUtils; | 
| 30 | 30 | |
| 31 | 31 | public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> | 
| 32 | 32 | implements MineContract.IMineView, View.OnClickListener { | 
| 33 | - LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about, layoutAdvice; | |
| 33 | + | |
| 34 | + LinearLayout childlayout, personinfo, layout_orderDetail, layout_order, layout_cache, layout_about, layout_feedback,top_layout,layout_afterLogin; | |
| 35 | + | |
| 34 | 36 | RoundedImageView user_photo; | 
| 35 | 37 | TextView user_name, user_mobile, tvExit, binding_state; | 
| 36 | 38 | |
| ... | ... | @@ -48,14 +50,16 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | 
| 48 | 50 | @Override | 
| 49 | 51 | public void initUI(View view, @Nullable Bundle savedInstanceState) { | 
| 50 | 52 | childlayout = view.findViewById(R.id.childlayout); | 
| 53 | + layout_afterLogin = view.findViewById(R.id.layout_afterLogin); | |
| 54 | + top_layout = view.findViewById(R.id.top_layout); | |
| 51 | 55 | personinfo = view.findViewById(R.id.personinfo); | 
| 52 | 56 | layout_order = view.findViewById(R.id.layout_order); | 
| 53 | 57 | layout_orderDetail = view.findViewById(R.id.layout_orderDetail); | 
| 54 | 58 | layout_cache = view.findViewById(R.id.layout_cache); | 
| 55 | 59 | layout_about = view.findViewById(R.id.layout_about); | 
| 56 | - layoutAdvice = view.findViewById(R.id.layoutAdvice); | |
| 57 | - layoutAdvice.setOnClickListener(this); | |
| 60 | + layout_feedback = view.findViewById(R.id.layout_feedback); | |
| 58 | 61 | layout_about.setOnClickListener(this); | 
| 62 | + layout_feedback.setOnClickListener(this); | |
| 59 | 63 | layout_cache.setOnClickListener(this); | 
| 60 | 64 | childlayout.setOnClickListener(this); | 
| 61 | 65 | personinfo.setOnClickListener(this); | 
| ... | ... | @@ -65,8 +69,10 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | 
| 65 | 69 | user_name = view.findViewById(R.id.user_name); | 
| 66 | 70 | user_mobile = view.findViewById(R.id.user_mobile); | 
| 67 | 71 | tvExit = view.findViewById(R.id.tvExit); | 
| 72 | + tvExit.setVisibility(View.GONE); | |
| 68 | 73 | tvExit.setOnClickListener(this); | 
| 69 | 74 | binding_state = view.findViewById(R.id.binding_state); | 
| 75 | + layout_afterLogin.setVisibility(View.GONE); | |
| 70 | 76 | if (AppConfig.ISBINDING) { | 
| 71 | 77 | binding_state.setText(""); | 
| 72 | 78 | } | 
| ... | ... | @@ -86,10 +92,16 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | 
| 86 | 92 | user_photo.setOval(true); | 
| 87 | 93 | user_name.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_NAME)); | 
| 88 | 94 | user_mobile.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME)); | 
| 95 | + top_layout.setBackgroundResource(R.drawable.backgroud_top); | |
| 89 | 96 | user_mobile.setVisibility(View.VISIBLE); | 
| 97 | + layout_afterLogin.setVisibility(View.VISIBLE); | |
| 98 | + tvExit.setVisibility(View.VISIBLE); | |
| 99 | + | |
| 90 | 100 | } else { | 
| 91 | 101 | user_name.setVisibility(View.VISIBLE); | 
| 92 | 102 | user_mobile.setVisibility(View.GONE); | 
| 103 | + layout_afterLogin.setVisibility(View.GONE); | |
| 104 | + tvExit.setVisibility(View.GONE); | |
| 93 | 105 | } | 
| 94 | 106 | } | 
| 95 | 107 | |
| ... | ... | @@ -125,8 +137,10 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | 
| 125 | 137 | case R.id.layout_about: | 
| 126 | 138 | WebViewActivity.getInstance(getActivity(), AppConfig.BASE_URL_ORDER + "About.html", -1); | 
| 127 | 139 | break; | 
| 128 | - case R.id.layoutAdvice: | |
| 129 | - WebViewActivity.getInstance(getActivity(), AppConfig.BASE_URL_ORDER + "FeedBack.aspx?userid=" + AppConfig.getAppConfig(getContext()).get(AppConfig.USER_ID), -1); | |
| 140 | + | |
| 141 | + case R.id.layout_feedback: | |
| 142 | + WebViewActivity.getInstance(getActivity(), AppConfig.BASE_URL_ORDER + "FeedBack.aspx?userid=" + AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID), -1); | |
| 143 | + | |
| 130 | 144 | break; | 
| 131 | 145 | default: | 
| 132 | 146 | break; | ... | ... | 
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
| ... | ... | @@ -68,6 +68,7 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | 
| 68 | 68 | mPresenter.getBanners("1", AppContext.getInstance().district==""?"越城区":AppContext.getInstance().district); | 
| 69 | 69 | } | 
| 70 | 70 | |
| 71 | + tvJump=view.findViewById(R.id.tvJump); | |
| 71 | 72 | |
| 72 | 73 | tvJump.setOnClickListener(new View.OnClickListener() { | 
| 73 | 74 | @Override | ... | ... | 
app/src/main/java/com/shunzhi/parent/views/TextAndImgShowView.java
| ... | ... | @@ -5,7 +5,6 @@ import android.content.Context; | 
| 5 | 5 | import android.support.annotation.DrawableRes; | 
| 6 | 6 | import android.support.annotation.Nullable; | 
| 7 | 7 | import android.util.AttributeSet; | 
| 8 | -import android.util.Log; | |
| 9 | 8 | import android.view.View; | 
| 10 | 9 | import android.widget.FrameLayout; | 
| 11 | 10 | import android.widget.ImageView; | 
| ... | ... | @@ -15,9 +14,7 @@ import android.widget.TextView; | 
| 15 | 14 | import com.bumptech.glide.Glide; | 
| 16 | 15 | import com.share.mvpsdk.utils.DisplayUtils; | 
| 17 | 16 | import com.shunzhi.parent.AppConfig; | 
| 18 | -import com.shunzhi.parent.AppContext; | |
| 19 | 17 | import com.shunzhi.parent.R; | 
| 20 | -import com.shunzhi.parent.util.GlideUtils; | |
| 21 | 18 | |
| 22 | 19 | |
| 23 | 20 | /** | 
| ... | ... | @@ -84,10 +81,12 @@ public class TextAndImgShowView extends LinearLayout { | 
| 84 | 81 | |
| 85 | 82 | public void setWidth(Activity activity, View layout_control) { | 
| 86 | 83 | // Log.d("66666", "layout_control=" + layout_control.getMeasuredWidth()); | 
| 87 | - LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); | |
| 84 | + LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT); | |
| 88 | 85 | params.width = (DisplayUtils.getScreenWidthPixels(activity) - | 
| 89 | 86 | DisplayUtils.dp2px(layout_control.getPaddingLeft() + layout_control.getPaddingRight() | 
| 90 | 87 | )) / 4; | 
| 91 | 88 | layout.setLayoutParams(params); | 
| 89 | + LayoutParams params1 = new LayoutParams(52,52); | |
| 90 | + image.setLayoutParams(params1); | |
| 92 | 91 | } | 
| 93 | 92 | } | ... | ... | 
516 Bytes
app/src/main/res/layout/fragment_mine.xml
| ... | ... | @@ -17,7 +17,7 @@ | 
| 17 | 17 | android:paddingTop="20dp" | 
| 18 | 18 | android:layout_width="match_parent" | 
| 19 | 19 | android:layout_height="180dp" | 
| 20 | - android:background="@drawable/backgroud_top" | |
| 20 | + android:background="@color/back_top" | |
| 21 | 21 | android:orientation="vertical"> | 
| 22 | 22 | |
| 23 | 23 | <TextView | 
| ... | ... | @@ -91,6 +91,7 @@ | 
| 91 | 91 | android:orientation="vertical"> | 
| 92 | 92 | |
| 93 | 93 | <LinearLayout | 
| 94 | + android:id="@+id/layout_afterLogin" | |
| 94 | 95 | android:layout_width="match_parent" | 
| 95 | 96 | android:layout_height="wrap_content" | 
| 96 | 97 | android:background="@color/white" | 
| ... | ... | @@ -103,17 +104,17 @@ | 
| 103 | 104 | |
| 104 | 105 | <TextView | 
| 105 | 106 | android:layout_width="25dp" | 
| 106 | - android:layout_height="20dp" | |
| 107 | + android:layout_height="30dp" | |
| 107 | 108 | android:layout_marginLeft="15dp" | 
| 108 | 109 | android:layout_marginRight="30dp" | 
| 109 | - android:background="@drawable/tiaoxing" /> | |
| 110 | + android:background="@drawable/xiaoxi" /> | |
| 110 | 111 | |
| 111 | 112 | <TextView | 
| 112 | 113 | android:layout_width="wrap_content" | 
| 113 | 114 | android:layout_height="wrap_content" | 
| 114 | 115 | android:layout_gravity="center_vertical" | 
| 115 | 116 | android:layout_weight="1" | 
| 116 | - android:text="我的订阅消息" | |
| 117 | + android:text="消息" | |
| 117 | 118 | android:textSize="@dimen/txtsize_title" /> | 
| 118 | 119 | |
| 119 | 120 | <TextView | 
| ... | ... | @@ -239,7 +240,7 @@ | 
| 239 | 240 | android:orientation="vertical"> | 
| 240 | 241 | |
| 241 | 242 | <LinearLayout | 
| 242 | - android:id="@+id/layoutAdvice" | |
| 243 | + android:id="@+id/layout_feedback" | |
| 243 | 244 | android:layout_width="match_parent" | 
| 244 | 245 | android:gravity="center_vertical" | 
| 245 | 246 | android:layout_height="?android:actionBarSize"> | ... | ... | 
app/src/main/res/layout/fragment_report.xml
| ... | ... | @@ -22,6 +22,7 @@ | 
| 22 | 22 | android:drawablePadding="10dp" | 
| 23 | 23 | android:drawableRight="@drawable/pull" | 
| 24 | 24 | android:text="" | 
| 25 | + android:visibility="gone" | |
| 25 | 26 | android:textColor="@color/textColor" | 
| 26 | 27 | android:textSize="@dimen/textSize16" /> | 
| 27 | 28 | |
| ... | ... | @@ -32,7 +33,7 @@ | 
| 32 | 33 | android:layout_weight="1" | 
| 33 | 34 | android:gravity="center_horizontal" | 
| 34 | 35 | android:id="@+id/tvDate" | 
| 35 | - android:text="2018年3月" | |
| 36 | + android:text="报告" | |
| 36 | 37 | android:textColor="@color/white" | 
| 37 | 38 | android:textSize="@dimen/textSize18" /> | 
| 38 | 39 | |
| ... | ... | @@ -42,6 +43,7 @@ | 
| 42 | 43 | android:layout_height="wrap_content" | 
| 43 | 44 | android:layout_gravity="center_vertical" | 
| 44 | 45 | android:drawableRight="@drawable/screen" | 
| 46 | + android:visibility="gone" | |
| 45 | 47 | android:text="筛选" | 
| 46 | 48 | android:textColor="@color/textColor" | 
| 47 | 49 | android:textSize="@dimen/textSize16" /> | 
| ... | ... | @@ -52,7 +54,7 @@ | 
| 52 | 54 | android:layout_height="match_parent" | 
| 53 | 55 | android:textSize="@dimen/size_dp_16" | 
| 54 | 56 | android:textColor="@color/xueqing_blue" | 
| 55 | - android:text="没有绑定孩子,\n请去个人中心绑定孩子" | |
| 57 | + android:text="功能暂不开放" | |
| 56 | 58 | android:gravity="center" | 
| 57 | 59 | android:lineSpacingExtra="@dimen/size_dp_5" | 
| 58 | 60 | android:id="@+id/tvNoData" | 
| ... | ... | @@ -61,6 +63,7 @@ | 
| 61 | 63 | <LinearLayout | 
| 62 | 64 | android:layout_width="match_parent" | 
| 63 | 65 | android:layout_height="match_parent" | 
| 66 | + android:visibility="gone" | |
| 64 | 67 | android:orientation="vertical"> | 
| 65 | 68 | |
| 66 | 69 | <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"--> | ... | ... |