Commit e71dbb40dfb4e99a3118f2bf5e0a27062505ec5f

Authored by 姚旭斌
1 parent e09ea034

no message

app/src/main/java/com/shunzhi/parent/adapter/ChildAdapter.java
... ... @@ -11,9 +11,12 @@ import android.widget.TextView;
11 11 import com.google.gson.Gson;
12 12 import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter;
13 13 import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder;
  14 +import com.shunzhi.parent.AppConfig;
  15 +import com.shunzhi.parent.AppContext;
14 16 import com.shunzhi.parent.R;
15 17 import com.shunzhi.parent.bean.ChildBean;
16 18 import com.shunzhi.parent.ui.activity.ChildDetialActivity;
  19 +import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity;
17 20  
18 21 /**
19 22 * Created by Administrator on 2018/3/9 0009.
... ... @@ -37,12 +40,15 @@ public class ChildAdapter extends BaseRecyclerViewAdapter<ChildBean> {
37 40 private class MyViewHolder extends BaseRecyclerViewHolder<ChildBean> {
38 41  
39 42 TextView txt_childname, txt_childclass;
  43 + TextView go_buy;
40 44  
41 45  
42 46 public MyViewHolder(View view) {
43 47 super(view);
44 48 txt_childname = view.findViewById(R.id.txt_childname);
45 49 txt_childclass = view.findViewById(R.id.txt_childclass);
  50 + go_buy = view.findViewById(R.id.go_buy);
  51 +
46 52 }
47 53  
48 54 @Override
... ... @@ -57,6 +63,15 @@ public class ChildAdapter extends BaseRecyclerViewAdapter&lt;ChildBean&gt; {
57 63 context.startActivity(new Intent().putExtra("childJson", jsonString).setClass(context, ChildDetialActivity.class));
58 64 }
59 65 });
  66 +
  67 + go_buy.setOnClickListener(new View.OnClickListener() {
  68 + @Override
  69 + public void onClick(View v) {
  70 + WebViewActivity.getInstance(context,
  71 + AppConfig.BASE_URL_ORDER+"/ParentOrderCenter.aspx?userid="+
  72 + AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID),AppConfig.ORDER_CENTER);
  73 + }
  74 + });
60 75 }
61 76  
62 77 }
... ...
app/src/main/java/com/shunzhi/parent/model/consult/ConsultModel.java
... ... @@ -6,8 +6,6 @@ import com.share.mvpsdk.helper.RetrofitCreateHelper;
6 6 import com.share.mvpsdk.helper.RxHelper;
7 7 import com.shunzhi.parent.AppConfig;
8 8 import com.shunzhi.parent.api.Consult;
9   -import com.shunzhi.parent.api.LoginRegisterApi;
10   -import com.shunzhi.parent.bean.UserInfo;
11 9 import com.shunzhi.parent.contract.consult.ConsultContract;
12 10  
13 11 import io.reactivex.Observable;
... ... @@ -32,8 +30,6 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM
32 30  
33 31 @Override
34 32 public Observable<JsonObject> getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex) {
35   -// return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL)
36   -// .getConsultContent(areaName,channel,toFirstPage,pageIndex);
37 33 return RetrofitCreateHelper.getInstance().createApi(Consult.class,AppConfig.BASE_URL).getConsultContent(areaName,channel,toFirstPage,pageIndex)
38 34 .compose(RxHelper.<JsonObject>rxSchedulerHelper());
39 35 }
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/ChildDetialActivity.java
... ... @@ -3,6 +3,7 @@ package com.shunzhi.parent.ui.activity;
3 3 import android.os.Bundle;
4 4 import android.text.TextUtils;
5 5 import android.view.View;
  6 +import android.widget.ImageView;
6 7 import android.widget.TextView;
7 8  
8 9 import com.google.gson.Gson;
... ... @@ -15,7 +16,8 @@ import com.shunzhi.parent.bean.ChildBean;
15 16 */
16 17  
17 18 public class ChildDetialActivity extends BaseCompatActivity {
18   - TextView child_name, child_school, child_class, school_area, student_code,center_title,back;
  19 + TextView child_name, child_school, child_class, school_area, student_code,center_title;
  20 + ImageView back;
19 21  
20 22 @Override
21 23 protected void initView(Bundle savedInstanceState) {
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/MyChildActivity.java
... ... @@ -11,6 +11,7 @@ import android.view.LayoutInflater;
11 11 import android.view.View;
12 12 import android.view.ViewGroup;
13 13 import android.view.WindowManager;
  14 +import android.widget.ImageView;
14 15 import android.widget.PopupWindow;
15 16 import android.widget.TextView;
16 17  
... ... @@ -26,6 +27,7 @@ import com.shunzhi.parent.bean.CurrentBean;
26 27 import com.shunzhi.parent.contract.mine.MyChildContract;
27 28 import com.shunzhi.parent.presenter.mine.MyChildPresenter;
28 29 import com.shunzhi.parent.ui.activity.binding.SelectSchoolActivity;
  30 +import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity;
29 31 import com.yanzhenjie.recyclerview.swipe.SwipeMenu;
30 32 import com.yanzhenjie.recyclerview.swipe.SwipeMenuBridge;
31 33 import com.yanzhenjie.recyclerview.swipe.SwipeMenuCreator;
... ... @@ -43,7 +45,8 @@ import java.util.List;
43 45 public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel>
44 46 implements MyChildContract.IMyChildView, View.OnClickListener {
45 47 SwipeMenuRecyclerView child_recycle;
46   - TextView back, center_title, add_child;
  48 + TextView center_title, add_child, go_buy;
  49 + ImageView back;
47 50 ChildAdapter childAdapter;
48 51 List<ChildBean> currlist = new ArrayList<>();
49 52  
... ... @@ -59,6 +62,7 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi
59 62 add_child = findViewById(R.id.add_child);
60 63 child_recycle = findViewById(R.id.child_recycle);
61 64 back = findViewById(R.id.back_top);
  65 +
62 66 center_title = findViewById(R.id.center_title);
63 67 center_title.setText("我的孩子");
64 68 add_child.setOnClickListener(this);
... ... @@ -119,6 +123,12 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi
119 123 finish();
120 124 } else if (v == add_child) {
121 125 startActivity(new Intent().setClass(MyChildActivity.this, SelectSchoolActivity.class));
  126 + } else if (v == go_buy) {
  127 + Bundle bundle = new Bundle();
  128 + bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" +
  129 + AppConfig.getAppConfig(this).get(AppConfig.USER_ID));
  130 + bundle.putInt("type",AppConfig.ORDER_CENTER);
  131 + startNewActivity(WebViewActivity.class, bundle);
122 132 }
123 133 }
124 134  
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CheckInfoActivity.java
... ... @@ -9,6 +9,7 @@ import android.view.LayoutInflater;
9 9 import android.view.View;
10 10 import android.view.ViewGroup;
11 11 import android.view.WindowManager;
  12 +import android.widget.ImageView;
12 13 import android.widget.LinearLayout;
13 14 import android.widget.PopupWindow;
14 15 import android.widget.TextView;
... ... @@ -38,8 +39,9 @@ public class CheckInfoActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyC
38 39 int school_id = 0, isNew, classId, studentId;
39 40 String captcha = "";
40 41 LinearLayout iphone_layout;
41   - TextView child_name, child_sex, child_grade, child_class, add_child, user_mobile, back, center_title;
  42 + TextView child_name, child_sex, child_grade, child_class, add_child, user_mobile, center_title;
42 43 ChildBean childBean;
  44 + ImageView back;
43 45  
44 46 @NonNull
45 47 @Override
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/binding/CreateChildInfoActivity.java
... ... @@ -9,6 +9,7 @@ import android.view.ContextMenu;
9 9 import android.view.MenuItem;
10 10 import android.view.View;
11 11 import android.widget.EditText;
  12 +import android.widget.ImageView;
12 13 import android.widget.TextView;
13 14  
14 15 import com.share.mvpsdk.base.BasePresenter;
... ... @@ -35,8 +36,9 @@ public class CreateChildInfoActivity extends BaseMVPCompatActivity&lt;MyChildContra
35 36 implements MyChildContract.IMyChildView, View.OnClickListener {
36 37  
37 38 int type, school_id, sexId, gradeId, classId;
38   - TextView select_sex, select_grade, select_class, add_child, center_title, back;
  39 + TextView select_sex, select_grade, select_class, add_child, center_title;
39 40 EditText child_name;
  41 + ImageView back;
40 42 Map<String, Integer> currMap = new ArrayMap<>();
41 43 List<ChildClass> gradeList = new ArrayList<>();
42 44 List<ChildClass> classList = new ArrayList<>();
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/binding/InviteCodeActivity.java
... ... @@ -6,6 +6,7 @@ import android.support.annotation.NonNull;
6 6 import android.text.TextUtils;
7 7 import android.view.View;
8 8 import android.widget.EditText;
  9 +import android.widget.ImageView;
9 10 import android.widget.TextView;
10 11  
11 12 import com.share.mvpsdk.base.BasePresenter;
... ... @@ -19,9 +20,10 @@ import com.shunzhi.parent.presenter.mine.MyChildPresenter;
19 20 */
20 21  
21 22 public class InviteCodeActivity extends BaseMVPCompatActivity {
22   - TextView add_child,center_title,back;
  23 + TextView add_child,center_title;
23 24 EditText et_invite_code;
24 25 int school_id;
  26 + ImageView back;
25 27  
26 28 @NonNull
27 29 @Override
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
... ... @@ -6,6 +6,7 @@ import android.support.annotation.NonNull;
6 6 import android.support.v7.widget.LinearLayoutManager;
7 7 import android.support.v7.widget.RecyclerView;
8 8 import android.view.View;
  9 +import android.widget.ImageView;
9 10 import android.widget.TextView;
10 11  
11 12 import com.share.mvpsdk.base.BasePresenter;
... ... @@ -39,7 +40,8 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity&lt;SchoolListContra
39 40 View.OnClickListener, SchoolListContract.ISchoolListView, CityPickerListener {
40 41  
41 42 private SideBar sideBar;
42   - private TextView dialog, go_next, tvLocalAddress, center_title, back;
  43 + private TextView dialog, go_next, tvLocalAddress, center_title;
  44 + ImageView back;
43 45 private RecyclerView schoollist;
44 46 private List<String> list = new ArrayList<>();
45 47 SchoolListAdapter schoolListAdapter;
... ...
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
... ... @@ -10,6 +10,7 @@ import android.webkit.WebChromeClient;
10 10 import android.webkit.WebSettings;
11 11 import android.webkit.WebView;
12 12 import android.webkit.WebViewClient;
  13 +import android.widget.ImageView;
13 14 import android.widget.LinearLayout;
14 15 import android.widget.ProgressBar;
15 16 import android.widget.TextView;
... ... @@ -25,7 +26,8 @@ public class WebViewActivity extends BaseCompatActivity {
25 26  
26 27 NestedScrollWebView nesteScrollWebView;
27 28 LinearLayout binding_success, binding_success2;
28   - TextView close,tv_info,zuoye,title_web;
  29 + TextView tv_info,zuoye,title_web;
  30 + ImageView close;
29 31 int type;
30 32  
31 33 private ProgressBar pvWeb;
... ...
app/src/main/java/com/shunzhi/parent/ui/fragment/loginandregistfragment/LoginAndRegistFragment.java
... ... @@ -97,7 +97,7 @@ public class LoginAndRegistFragment extends BaseMVPCompatFragment&lt;LoginAndRegist
97 97 phoneNumber.addTextChangedListener(textWatcher);
98 98 idCode.addTextChangedListener(textWatcher);
99 99 password.addTextChangedListener(textWatcher);
100   - mPresenter.loginResult("18358585335", "575335");
  100 +// mPresenter.loginResult("18358585335", "575335");
101 101  
102 102 passwordLayout_new = view.findViewById(R.id.passwordLayout_new);
103 103 et_password_new = view.findViewById(R.id.et_password_new);
... ...
app/src/main/res/layout/activity_web_view.xml
... ... @@ -14,14 +14,16 @@
14 14 android:layout_height="?android:actionBarSize"
15 15 android:orientation="horizontal"
16 16 >
17   - <TextView
  17 + <ImageView
18 18 android:id="@+id/close_btn"
19   - android:layout_width="20dp"
20   - android:layout_height="20dp"
21   - android:layout_marginLeft="10dp"
22   - android:layout_centerVertical="true"
23   - android:background="@drawable/arrow_left"
24   - />
  19 + android:layout_width="wrap_content"
  20 + android:layout_height="match_parent"
  21 + android:gravity="center"
  22 + android:paddingLeft="@dimen/size_dp_15"
  23 + android:src="@drawable/back"
  24 + android:paddingRight="@dimen/size_dp_15"
  25 + android:textColor="@color/textColor"
  26 + android:textSize="@dimen/textSize16" />
25 27 <TextView
26 28 android:id="@+id/title_web"
27 29 android:layout_width="wrap_content"
... ...
app/src/main/res/layout/fragment_zi_xun.xml
... ... @@ -15,13 +15,16 @@
15 15 android:layout_weight="2"></com.stx.xhb.xbanner.XBanner>
16 16  
17 17 <LinearLayout
18   - android:layout_width="wrap_content"
  18 + android:layout_width="match_parent"
19 19 android:layout_height="wrap_content"
  20 + android:paddingTop="@dimen/size_dp_10"
20 21 android:layout_marginLeft="@dimen/size_dp_10"
21 22 android:layout_marginRight="@dimen/size_dp_10"
22 23 >
  24 +
23 25 <include layout="@layout/layout_textandimgshow"
24 26 />
  27 +
25 28 </LinearLayout>
26 29 <LinearLayout
27 30 android:layout_width="match_parent"
... ...
app/src/main/res/layout/top.xml
... ... @@ -5,12 +5,16 @@
5 5 android:background="@color/back_top"
6 6 android:padding="10dp">
7 7  
8   - <TextView
  8 + <ImageView
9 9 android:id="@+id/back_top"
10   - android:layout_width="20dp"
11   - android:layout_height="20dp"
12   - android:layout_gravity="center_vertical"
13   - android:background="@drawable/arrow_left" />
  10 + android:layout_width="wrap_content"
  11 + android:layout_height="match_parent"
  12 + android:gravity="center"
  13 + android:paddingLeft="@dimen/size_dp_15"
  14 + android:src="@drawable/back"
  15 + android:paddingRight="@dimen/size_dp_15"
  16 + android:textColor="@color/textColor"
  17 + android:textSize="@dimen/textSize16" />
14 18  
15 19 <TextView
16 20 android:id="@+id/center_title"
... ... @@ -19,7 +23,7 @@
19 23 android:layout_weight="1"
20 24 android:text="主题"
21 25 android:gravity="center"
22   - android:textColor="@color/textColor"
  26 + android:textColor="@color/white"
23 27 android:textSize="@dimen/textSize16" />
24 28 <TextView
25 29 android:layout_width="30dp"
... ...