Commit ec9c6c5dc85de7728b4c1563b304f5cfc0cdd7c1

Authored by 张道锋
2 parents abf181bd 69679356

Merge branch 'developer' of http://git.shunzhi.net/taohd/parentwork into developer

# Conflicts:
#	app/src/main/AndroidManifest.xml
Showing 27 changed files with 279 additions and 136 deletions   Show diff stats
app/src/main/AndroidManifest.xml
@@ -129,7 +129,9 @@ @@ -129,7 +129,9 @@
129 <activity 129 <activity
130 android:name=".ui.activity.MyChildActivity" 130 android:name=".ui.activity.MyChildActivity"
131 android:screenOrientation="portrait"/> 131 android:screenOrientation="portrait"/>
132 - <activity android:name=".ui.activity.consult.ConsultOneLevelActivity"/> 132 + <activity android:name=".ui.activity.consult.ConsultOneLevelActivity"
  133 + android:windowSoftInputMode="adjustPan|stateAlwaysHidden"
  134 + />
133 <!-- <activity android:name=".ui.activity.LoginAndRegistActivity" /> --> 135 <!-- <activity android:name=".ui.activity.LoginAndRegistActivity" /> -->
134 <activity 136 <activity
135 android:name=".ui.MainActivity" 137 android:name=".ui.MainActivity"
@@ -170,8 +172,9 @@ @@ -170,8 +172,9 @@
170 android:name=".ui.activity.mywebview.WebViewActivity" 172 android:name=".ui.activity.mywebview.WebViewActivity"
171 android:launchMode="singleInstance" 173 android:launchMode="singleInstance"
172 android:screenOrientation="portrait"/> 174 android:screenOrientation="portrait"/>
173 - <activity  
174 - android:name=".ui.activity.consult.ConsultTwoLevelActivity" 175 +
  176 + <activity android:name=".ui.activity.consult.ConsultTwoLevelActivity"
  177 + android:windowSoftInputMode="adjustPan|stateAlwaysHidden"
175 android:launchMode="singleInstance"/> 178 android:launchMode="singleInstance"/>
176 <activity 179 <activity
177 android:name=".ui.activity.orderdetail.OrderDetailActivity" 180 android:name=".ui.activity.orderdetail.OrderDetailActivity"
app/src/main/java/com/shunzhi/parent/adapter/MyConsultAdapter.java
@@ -84,6 +84,8 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter&lt;ChannelContextBean @@ -84,6 +84,8 @@ public class MyConsultAdapter extends BaseRecyclerViewAdapter&lt;ChannelContextBean
84 normal_content.setVisibility(View.VISIBLE); 84 normal_content.setVisibility(View.VISIBLE);
85 tvConsultTitle.setText(object.getTitle()); 85 tvConsultTitle.setText(object.getTitle());
86 tvConsultContent.setText(object.getContent()); 86 tvConsultContent.setText(object.getContent());
  87 + tvPingLunNums.setText("评论:"+object.getTalkNum()+"");
  88 + tvZhuanFaNums.setText("转发:"+object.getForwardingNum()+"");
87 GlideUtils.showImg(mContext,iv_consult,object.getImage()); 89 GlideUtils.showImg(mContext,iv_consult,object.getImage());
88 normal_content.setOnClickListener(new View.OnClickListener() { 90 normal_content.setOnClickListener(new View.OnClickListener() {
89 @Override 91 @Override
app/src/main/java/com/shunzhi/parent/contract/consult/ConsultContract.java
@@ -26,6 +26,8 @@ public interface ConsultContract { @@ -26,6 +26,8 @@ public interface ConsultContract {
26 public abstract void getBanners(String position, String areaName); 26 public abstract void getBanners(String position, String areaName);
27 27
28 public abstract void getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex); 28 public abstract void getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex);
  29 +
  30 + public abstract void getInformationTopic(String keyword,String areaName,String channel,String toFirstPage,int pageIndex);
29 } 31 }
30 32
31 33
@@ -35,6 +37,8 @@ public interface ConsultContract { @@ -35,6 +37,8 @@ public interface ConsultContract {
35 Observable<JsonObject> getBanners(String position, String areaName); 37 Observable<JsonObject> getBanners(String position, String areaName);
36 38
37 Observable<JsonObject> getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex); 39 Observable<JsonObject> getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex);
  40 +
  41 + Observable<JsonObject> getInformationTopic(String keyword,String areaName,String channel,String toFirstPage,int pageIndex);
38 } 42 }
39 43
40 interface IConsultView extends IBaseFragment { 44 interface IConsultView extends IBaseFragment {
app/src/main/java/com/shunzhi/parent/model/consult/ConsultModel.java
@@ -34,6 +34,12 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM @@ -34,6 +34,12 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM
34 .compose(RxHelper.<JsonObject>rxSchedulerHelper()); 34 .compose(RxHelper.<JsonObject>rxSchedulerHelper());
35 } 35 }
36 36
  37 + @Override
  38 + public Observable<JsonObject> getInformationTopic(String keyword, String areaName, String channel, String toFirstPage, int pageIndex) {
  39 + return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL)
  40 + .getInformationTopic(keyword,areaName,channel,toFirstPage,pageIndex).compose(RxHelper.<JsonObject>rxSchedulerHelper());
  41 + }
  42 +
37 public static ConsultContract.IConsultModel newInstance() { 43 public static ConsultContract.IConsultModel newInstance() {
38 return new ConsultModel(); 44 return new ConsultModel();
39 } 45 }
app/src/main/java/com/shunzhi/parent/presenter/consult/ConsultPresenter.java
1 package com.shunzhi.parent.presenter.consult; 1 package com.shunzhi.parent.presenter.consult;
2 2
  3 +import android.util.Log;
3 import android.view.View; 4 import android.view.View;
4 import android.widget.LinearLayout; 5 import android.widget.LinearLayout;
5 6
@@ -95,9 +96,6 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { @@ -95,9 +96,6 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter {
95 mIView.showChannel(channelList); 96 mIView.showChannel(channelList);
96 mIView.showContext(contextList); 97 mIView.showContext(contextList);
97 98
98 -  
99 -  
100 -  
101 } 99 }
102 }, new Consumer<Throwable>() { 100 }, new Consumer<Throwable>() {
103 @Override 101 @Override
@@ -111,6 +109,30 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { @@ -111,6 +109,30 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter {
111 } 109 }
112 110
113 @Override 111 @Override
  112 + public void getInformationTopic(String keyword, String areaName, String channel, String toFirstPage, int pageIndex) {
  113 + mRxManager.register(mIModel.getInformationTopic(keyword,areaName,channel,toFirstPage,pageIndex).subscribe(new Consumer<JsonObject>() {
  114 + @Override
  115 + public void accept(JsonObject jsonObject) throws Exception {
  116 + JsonObject json=jsonObject.getAsJsonObject("data");
  117 + Gson g=new Gson();
  118 + List<ChannelContextBean> channelList = new ArrayList<>();
  119 + JsonArray jsonArray=json.getAsJsonArray("channelList");
  120 + for (int i = 0; i < jsonArray.size(); i++) {
  121 + ChannelContextBean channelBean=g.fromJson(jsonArray.get(i),ChannelContextBean.class);
  122 + channelList.add(channelBean);
  123 + }
  124 + mIView.showContext(channelList);
  125 + }
  126 + }, new Consumer<Throwable>() {
  127 + @Override
  128 + public void accept(Throwable throwable) throws Exception {
  129 +// Log.d("66666","getInformationTopic="+throwable);
  130 + OkHttpExceptionUtil.handOkHttpException((HttpException) throwable);
  131 + }
  132 + }));
  133 + }
  134 +
  135 + @Override
114 public ConsultContract.IConsultModel getModel() { 136 public ConsultContract.IConsultModel getModel() {
115 return ConsultModel.newInstance(); 137 return ConsultModel.newInstance();
116 } 138 }
app/src/main/java/com/shunzhi/parent/presenter/consult/consultone/ConsultOnePresenter.java
@@ -101,6 +101,7 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{ @@ -101,6 +101,7 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{
101 }, new Consumer<Throwable>() { 101 }, new Consumer<Throwable>() {
102 @Override 102 @Override
103 public void accept(Throwable throwable) throws Exception { 103 public void accept(Throwable throwable) throws Exception {
  104 +// Log.d("66666","getConsultContent="+throwable);
104 OkHttpExceptionUtil.handOkHttpException((HttpException) throwable); 105 OkHttpExceptionUtil.handOkHttpException((HttpException) throwable);
105 } 106 }
106 })); 107 }));
@@ -113,18 +114,22 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{ @@ -113,18 +114,22 @@ public class ConsultOnePresenter extends ConsultOneContract.ConsultOnePresenter{
113 mRxManager.register(mIModel.getInformationTopic(keyword,areaName,channel,toFirstPage,pageIndex).subscribe(new Consumer<JsonObject>() { 114 mRxManager.register(mIModel.getInformationTopic(keyword,areaName,channel,toFirstPage,pageIndex).subscribe(new Consumer<JsonObject>() {
114 @Override 115 @Override
115 public void accept(JsonObject jsonObject) throws Exception { 116 public void accept(JsonObject jsonObject) throws Exception {
  117 + Log.d("66666","getInformationTopic="+jsonObject.toString());
116 JsonObject json=jsonObject.getAsJsonObject("data"); 118 JsonObject json=jsonObject.getAsJsonObject("data");
117 Gson g=new Gson(); 119 Gson g=new Gson();
118 - ChannelInfo channelInfo = g.fromJson(json.toString(),ChannelInfo.class);  
119 -// Log.e("ssss-===",channelInfo.toString());  
120 - List<ChannelContextBean> contextList = channelInfo.getChannelContent();  
121 - List<ChannelBean> channelList = channelInfo.getSubchannel();  
122 - mIView.showChannel(channelList);  
123 - mIView.showConsultContent(contextList); 120 + List<ChannelContextBean> channelList = new ArrayList<>();
  121 + JsonArray jsonArray=json.getAsJsonArray("channelList");
  122 + for (int i = 0; i < jsonArray.size(); i++) {
  123 + ChannelContextBean channelBean=g.fromJson(jsonArray.get(i),ChannelContextBean.class);
  124 + channelList.add(channelBean);
  125 + }
  126 + Log.d("66666","channelList="+channelList.toString());
  127 + mIView.showConsultContent(channelList);
124 } 128 }
125 }, new Consumer<Throwable>() { 129 }, new Consumer<Throwable>() {
126 @Override 130 @Override
127 public void accept(Throwable throwable) throws Exception { 131 public void accept(Throwable throwable) throws Exception {
  132 +// Log.d("66666","getInformationTopic="+throwable);
128 OkHttpExceptionUtil.handOkHttpException((HttpException) throwable); 133 OkHttpExceptionUtil.handOkHttpException((HttpException) throwable);
129 } 134 }
130 })); 135 }));
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
1 package com.shunzhi.parent.presenter.loginandregister; 1 package com.shunzhi.parent.presenter.loginandregister;
2 2
3 import android.text.TextUtils; 3 import android.text.TextUtils;
4 -import android.util.Log;  
5 4
6 import com.google.gson.JsonObject; 5 import com.google.gson.JsonObject;
7 import com.share.mvpsdk.helper.RetrofitCreateHelper; 6 import com.share.mvpsdk.helper.RetrofitCreateHelper;
@@ -26,7 +25,6 @@ import io.reactivex.functions.Consumer; @@ -26,7 +25,6 @@ import io.reactivex.functions.Consumer;
26 import okhttp3.ResponseBody; 25 import okhttp3.ResponseBody;
27 import retrofit2.HttpException; 26 import retrofit2.HttpException;
28 import retrofit2.Response; 27 import retrofit2.Response;
29 -import timber.log.Timber;  
30 28
31 /** 29 /**
32 * Created by Administrator on 2018/3/6 0006. 30 * Created by Administrator on 2018/3/6 0006.
@@ -174,7 +172,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre @@ -174,7 +172,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre
174 String token = Utils.MD5(account); 172 String token = Utils.MD5(account);
175 nimLogin(account, token); 173 nimLogin(account, token);
176 174
177 - mIView.getUserInfo(0); 175 +// mIView.getUserInfo(0);
178 176
179 } else { 177 } else {
180 LoginAndRegistFragment.progressDialog.dismiss(); 178 LoginAndRegistFragment.progressDialog.dismiss();
app/src/main/java/com/shunzhi/parent/ui/activity/LoginAndRegistActivity.java
1 package com.shunzhi.parent.ui.activity; 1 package com.shunzhi.parent.ui.activity;
2 2
3 import android.os.Bundle; 3 import android.os.Bundle;
4 -import android.util.Log;  
5 4
6 import com.share.mvpsdk.base.activity.BaseCompatActivity; 5 import com.share.mvpsdk.base.activity.BaseCompatActivity;
7 import com.shunzhi.parent.R; 6 import com.shunzhi.parent.R;
@@ -19,9 +18,10 @@ public class LoginAndRegistActivity extends BaseCompatActivity { @@ -19,9 +18,10 @@ public class LoginAndRegistActivity extends BaseCompatActivity {
19 protected void initView(Bundle savedInstanceState) { 18 protected void initView(Bundle savedInstanceState) {
20 if (savedInstanceState == null) { 19 if (savedInstanceState == null) {
21 type = getIntent().getStringExtra("type"); 20 type = getIntent().getStringExtra("type");
22 - Log.e("aaa--==",type);  
23 - mFragments[0] = LoginAndRegistFragment.getInstance(type);  
24 - loadRootFragment(R.id.frame, mFragments[0]); 21 + if (null!=type){
  22 + mFragments[0] = LoginAndRegistFragment.getInstance(type);
  23 + loadRootFragment(R.id.frame, mFragments[0]);
  24 + }
25 } else { 25 } else {
26 mFragments[0] = findFragment(LoginAndRegistFragment.class); 26 mFragments[0] = findFragment(LoginAndRegistFragment.class);
27 } 27 }
app/src/main/java/com/shunzhi/parent/ui/activity/MyChildActivity.java
@@ -45,7 +45,7 @@ import java.util.List; @@ -45,7 +45,7 @@ import java.util.List;
45 public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel> 45 public class MyChildActivity extends BaseMVPCompatActivity<MyChildContract.MyChildPresenter, MyChildContract.IMyChildModel>
46 implements MyChildContract.IMyChildView, View.OnClickListener { 46 implements MyChildContract.IMyChildView, View.OnClickListener {
47 SwipeMenuRecyclerView child_recycle; 47 SwipeMenuRecyclerView child_recycle;
48 - TextView center_title, add_child, go_buy; 48 + TextView center_title, add_child, go_buy;
49 ImageView back; 49 ImageView back;
50 ChildAdapter childAdapter; 50 ChildAdapter childAdapter;
51 List<ChildBean> currlist = new ArrayList<>(); 51 List<ChildBean> currlist = new ArrayList<>();
@@ -127,7 +127,7 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi @@ -127,7 +127,7 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi
127 Bundle bundle = new Bundle(); 127 Bundle bundle = new Bundle();
128 bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" + 128 bundle.putString("url", AppConfig.BASE_URL_ORDER + "ParentOrderCenter.aspx?userid=" +
129 AppConfig.getAppConfig(this).get(AppConfig.USER_ID)); 129 AppConfig.getAppConfig(this).get(AppConfig.USER_ID));
130 - bundle.putInt("type",AppConfig.ORDER_CENTER); 130 + bundle.putInt("type", AppConfig.ORDER_CENTER);
131 startNewActivity(WebViewActivity.class, bundle); 131 startNewActivity(WebViewActivity.class, bundle);
132 } 132 }
133 } 133 }
@@ -146,7 +146,7 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi @@ -146,7 +146,7 @@ public class MyChildActivity extends BaseMVPCompatActivity&lt;MyChildContract.MyChi
146 } 146 }
147 147
148 @Override 148 @Override
149 - public void addChildSuccess(String account,String password) { 149 + public void addChildSuccess(String account, String password) {
150 150
151 } 151 }
152 152
app/src/main/java/com/shunzhi/parent/ui/activity/consult/ConsultTwoLevelActivity.java
@@ -88,7 +88,7 @@ public class ConsultTwoLevelActivity extends BaseMVPCompatActivity implements Vi @@ -88,7 +88,7 @@ public class ConsultTwoLevelActivity extends BaseMVPCompatActivity implements Vi
88 back(); 88 back();
89 break; 89 break;
90 case R.id.ivSearch: 90 case R.id.ivSearch:
91 - 91 + consultTwoLevelFragment.showSearch(et_search.getText().toString());
92 break; 92 break;
93 } 93 }
94 } 94 }
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
@@ -19,7 +19,6 @@ import android.widget.TextView; @@ -19,7 +19,6 @@ import android.widget.TextView;
19 import com.share.mvpsdk.base.activity.BaseCompatActivity; 19 import com.share.mvpsdk.base.activity.BaseCompatActivity;
20 import com.share.mvpsdk.utils.AppUtils; 20 import com.share.mvpsdk.utils.AppUtils;
21 import com.share.mvpsdk.utils.NetworkConnectionUtils; 21 import com.share.mvpsdk.utils.NetworkConnectionUtils;
22 -import com.share.mvpsdk.utils.ToastUtils;  
23 import com.share.mvpsdk.widgets.NestedScrollWebView; 22 import com.share.mvpsdk.widgets.NestedScrollWebView;
24 import com.shunzhi.parent.AppConfig; 23 import com.shunzhi.parent.AppConfig;
25 import com.shunzhi.parent.R; 24 import com.shunzhi.parent.R;
@@ -40,7 +39,6 @@ public class WebViewActivity extends BaseCompatActivity { @@ -40,7 +39,6 @@ public class WebViewActivity extends BaseCompatActivity {
40 Intent intent = new Intent(context, WebViewActivity.class); 39 Intent intent = new Intent(context, WebViewActivity.class);
41 intent.putExtra("url", url); 40 intent.putExtra("url", url);
42 intent.putExtra("type", type); 41 intent.putExtra("type", type);
43 - intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);  
44 context.startActivity(intent); 42 context.startActivity(intent);
45 } 43 }
46 44
@@ -116,6 +114,7 @@ public class WebViewActivity extends BaseCompatActivity { @@ -116,6 +114,7 @@ public class WebViewActivity extends BaseCompatActivity {
116 initWebView(); 114 initWebView();
117 initWebSetting(nesteScrollWebView.getSettings()); 115 initWebSetting(nesteScrollWebView.getSettings());
118 nesteScrollWebView.loadUrl(getIntent().getStringExtra("url")); 116 nesteScrollWebView.loadUrl(getIntent().getStringExtra("url"));
  117 + Log.d("66666","getIntent().getStringExtra(\"url\")="+getIntent().getStringExtra("url"));
119 } 118 }
120 119
121 @Override 120 @Override
@@ -178,7 +177,6 @@ public class WebViewActivity extends BaseCompatActivity { @@ -178,7 +177,6 @@ public class WebViewActivity extends BaseCompatActivity {
178 nesteScrollWebView.setWebViewClient(new WebViewClient() { 177 nesteScrollWebView.setWebViewClient(new WebViewClient() {
179 @Override 178 @Override
180 public boolean shouldOverrideUrlLoading(WebView view, String url) { 179 public boolean shouldOverrideUrlLoading(WebView view, String url) {
181 - Log.d("666666", "url=" + url);  
182 if (url.startsWith("http")) view.loadUrl(url); 180 if (url.startsWith("http")) view.loadUrl(url);
183 // if (url.contains("platformapi/startapp")) { 181 // if (url.contains("platformapi/startapp")) {
184 // startAlipayActivity(url); 182 // startAlipayActivity(url);
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
@@ -13,7 +13,6 @@ import android.widget.ImageView; @@ -13,7 +13,6 @@ import android.widget.ImageView;
13 import android.widget.LinearLayout; 13 import android.widget.LinearLayout;
14 import android.widget.TextView; 14 import android.widget.TextView;
15 15
16 -import com.bumptech.glide.Glide;  
17 import com.share.mvpsdk.base.BasePresenter; 16 import com.share.mvpsdk.base.BasePresenter;
18 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 17 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
19 import com.share.mvpsdk.utils.ToastUtils; 18 import com.share.mvpsdk.utils.ToastUtils;
@@ -74,11 +73,13 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP @@ -74,11 +73,13 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP
74 textAndImg_xqjc.setTextColor(R.color.white); 73 textAndImg_xqjc.setTextColor(R.color.white);
75 textAndImg_xqjc.setText("学情检测"); 74 textAndImg_xqjc.setText("学情检测");
76 textAndImg_xqjc.setImgs(R.drawable.xqjc, R.drawable.xqjc); 75 textAndImg_xqjc.setImgs(R.drawable.xqjc, R.drawable.xqjc);
  76 + textAndImg_xqjc.setOnClickListener(this);
77 textAndImg_xqjc.setSelect(true); 77 textAndImg_xqjc.setSelect(true);
78 78
79 textAndImg_zxlx.setText("专项训练"); 79 textAndImg_zxlx.setText("专项训练");
80 textAndImg_zxlx.setTextColor(R.color.white); 80 textAndImg_zxlx.setTextColor(R.color.white);
81 textAndImg_zxlx.setImgs(R.drawable.zxlx, R.drawable.zxlx); 81 textAndImg_zxlx.setImgs(R.drawable.zxlx, R.drawable.zxlx);
  82 + textAndImg_zxlx.setOnClickListener(this);
82 textAndImg_zxlx.setSelect(true); 83 textAndImg_zxlx.setSelect(true);
83 84
84 initListeners(view); 85 initListeners(view);
@@ -100,8 +101,8 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP @@ -100,8 +101,8 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP
100 public void onResume() { 101 public void onResume() {
101 super.onResume(); 102 super.onResume();
102 // if (!tvLocalAddress.getText().toString().equals(AppContext.getInstance().cityName)){ 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&lt;CepingContract.CePingP @@ -133,16 +134,16 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP
133 public void onClick(View view) { 134 public void onClick(View view) {
134 switch (view.getId()) { 135 switch (view.getId()) {
135 case R.id.frame_hot1://热门课程 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 break; 139 break;
139 case R.id.frame_hot2: 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 break; 143 break;
143 case R.id.frame_hot3: 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 break; 147 break;
147 case R.id.tvLocalAddress: 148 case R.id.tvLocalAddress:
148 // AppContext.getInstance().startLocation(); 149 // AppContext.getInstance().startLocation();
@@ -153,6 +154,14 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP @@ -153,6 +154,14 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP
153 case R.id.ivCamera: 154 case R.id.ivCamera:
154 ToastUtils.showToast("功能暂未上线"); 155 ToastUtils.showToast("功能暂未上线");
155 break; 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
@@ -160,7 +169,7 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP @@ -160,7 +169,7 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP
160 @Override 169 @Override
161 public void onReceive(Context context, Intent intent) { 170 public void onReceive(Context context, Intent intent) {
162 if (intent.getAction().equals(AppContext.LOCATION_CITYNAME + "")) { 171 if (intent.getAction().equals(AppContext.LOCATION_CITYNAME + "")) {
163 - tvLocalAddress.setText(AppContext.getInstance().cityName); 172 + tvLocalAddress.setText(AppContext.getInstance().district);
164 } 173 }
165 } 174 }
166 }; 175 };
@@ -176,27 +185,27 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP @@ -176,27 +185,27 @@ public class CePingFragment extends BaseMVPCompatFragment&lt;CepingContract.CePingP
176 public void getCity(String name) { 185 public void getCity(String name) {
177 tvLocalAddress.setText(name.split(" ")[2]); 186 tvLocalAddress.setText(name.split(" ")[2]);
178 mPresenter.getTools(layout_control, name.split(" ")[2]); 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 @Override 192 @Override
184 public void showTools(List<ToolBean> toolBeanList) { 193 public void showTools(List<ToolBean> toolBeanList) {
185 if (toolBeanList.size() > 0) { 194 if (toolBeanList.size() > 0) {
186 tvCourse1.setText(toolBeanList.get(0).toolName); 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 tvCourse1.setTag(toolBeanList.get(0).toolUrl); 197 tvCourse1.setTag(toolBeanList.get(0).toolUrl);
189 } 198 }
190 199
191 if (toolBeanList.size() > 1) { 200 if (toolBeanList.size() > 1) {
192 tvCourse2.setText(toolBeanList.get(1).toolName); 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 tvCourse2.setTag(toolBeanList.get(1).toolUrl); 203 tvCourse2.setTag(toolBeanList.get(1).toolUrl);
195 } 204 }
196 205
197 if (toolBeanList.size() > 2) { 206 if (toolBeanList.size() > 2) {
198 tvCourse3.setText(toolBeanList.get(2).toolName); 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 tvCourse3.setTag(toolBeanList.get(2).toolUrl); 209 tvCourse3.setTag(toolBeanList.get(2).toolUrl);
201 } 210 }
202 } 211 }
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
@@ -8,12 +8,13 @@ import android.os.Bundle; @@ -8,12 +8,13 @@ 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.v7.widget.LinearLayoutManager; 10 import android.support.v7.widget.LinearLayoutManager;
  11 +import android.text.TextUtils;
11 import android.view.View; 12 import android.view.View;
  13 +import android.widget.EditText;
12 import android.widget.ImageView; 14 import android.widget.ImageView;
13 import android.widget.LinearLayout; 15 import android.widget.LinearLayout;
14 import android.widget.TextView; 16 import android.widget.TextView;
15 17
16 -import com.bumptech.glide.Glide;  
17 import com.jcodecraeer.xrecyclerview.XRecyclerView; 18 import com.jcodecraeer.xrecyclerview.XRecyclerView;
18 import com.share.mvpsdk.base.BasePresenter; 19 import com.share.mvpsdk.base.BasePresenter;
19 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 20 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
@@ -53,6 +54,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -53,6 +54,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
53 54
54 List<String> imgesUrl = new ArrayList<>(); 55 List<String> imgesUrl = new ArrayList<>();
55 List<String> describeList = new ArrayList<>(); 56 List<String> describeList = new ArrayList<>();
  57 + List<GuangGaoBean> guanggaoList = new ArrayList<>();
56 List<ChannelContextBean> contextList = new ArrayList<>(); 58 List<ChannelContextBean> contextList = new ArrayList<>();
57 59
58 JZVideoPlayerStandard videoplayer; 60 JZVideoPlayerStandard videoplayer;
@@ -63,6 +65,8 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -63,6 +65,8 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
63 65
64 CityPicker cityPicker = null; 66 CityPicker cityPicker = null;
65 67
  68 + EditText et_search;
  69 +
66 int pageIndex = 1; 70 int pageIndex = 1;
67 boolean first = true; 71 boolean first = true;
68 72
@@ -82,6 +86,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -82,6 +86,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
82 videoplayer = view.findViewById(R.id.videoplayer); 86 videoplayer = view.findViewById(R.id.videoplayer);
83 tvLocalAddress = view.findViewById(R.id.tvLocalAddress); 87 tvLocalAddress = view.findViewById(R.id.tvLocalAddress);
84 layout_control = view.findViewById(R.id.layout_control); 88 layout_control = view.findViewById(R.id.layout_control);
  89 + et_search=view.findViewById(R.id.et_search);
85 tvLocalAddress.setText(AppContext.getInstance().district); 90 tvLocalAddress.setText(AppContext.getInstance().district);
86 videoplayer.batteryLevel.setVisibility(View.GONE); 91 videoplayer.batteryLevel.setVisibility(View.GONE);
87 videoplayer.replayTextView.setVisibility(View.GONE); 92 videoplayer.replayTextView.setVisibility(View.GONE);
@@ -135,10 +140,9 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -135,10 +140,9 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
135 xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() { 140 xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() {
136 @Override 141 @Override
137 public void onItemClick(XBanner banner, int position) { 142 public void onItemClick(XBanner banner, int position) {
138 - WebViewActivity.getInstance(getContext(), describeList.get(position), -1); 143 + WebViewActivity.getInstance(getContext(), imgesUrl.get(position), -1);
139 } 144 }
140 }); 145 });
141 -  
142 } 146 }
143 147
144 @NonNull 148 @NonNull
@@ -169,7 +173,10 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -169,7 +173,10 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
169 else cityPicker.show(); 173 else cityPicker.show();
170 break; 174 break;
171 case R.id.ivSearch://搜索按钮 175 case R.id.ivSearch://搜索按钮
172 - 176 + if (!TextUtils.isEmpty(et_search.getText().toString())){
  177 + contextList.clear();
  178 + mPresenter.getInformationTopic(et_search.getText().toString(),AppContext.getInstance().district,"0","1",1);
  179 + }
173 break; 180 break;
174 } 181 }
175 } 182 }
@@ -207,6 +214,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -207,6 +214,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
207 public void showBanners(List<GuangGaoBean> guangGaoBeanList) { 214 public void showBanners(List<GuangGaoBean> guangGaoBeanList) {
208 describeList.clear(); 215 describeList.clear();
209 imgesUrl.clear(); 216 imgesUrl.clear();
  217 + guanggaoList=guangGaoBeanList;
210 for (int i = 0; i < guangGaoBeanList.size(); i++) { 218 for (int i = 0; i < guangGaoBeanList.size(); i++) {
211 imgesUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); 219 imgesUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc);
212 describeList.add(guangGaoBeanList.get(i).describe); 220 describeList.add(guangGaoBeanList.get(i).describe);
@@ -239,7 +247,6 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -239,7 +247,6 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
239 first = false; 247 first = false;
240 } 248 }
241 249
242 -  
243 } 250 }
244 251
245 @Override 252 @Override
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -30,7 +30,9 @@ import com.shunzhi.parent.util.GlideUtils; @@ -30,7 +30,9 @@ import com.shunzhi.parent.util.GlideUtils;
30 30
31 public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel> 31 public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract.LoginPresenter, LoginAndRegisterContract.ILoginModel>
32 implements MineContract.IMineView, View.OnClickListener { 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 RoundedImageView user_photo; 36 RoundedImageView user_photo;
35 TextView user_name, user_mobile, tvExit, binding_state; 37 TextView user_name, user_mobile, tvExit, binding_state;
36 38
@@ -48,14 +50,16 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -48,14 +50,16 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
48 @Override 50 @Override
49 public void initUI(View view, @Nullable Bundle savedInstanceState) { 51 public void initUI(View view, @Nullable Bundle savedInstanceState) {
50 childlayout = view.findViewById(R.id.childlayout); 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 personinfo = view.findViewById(R.id.personinfo); 55 personinfo = view.findViewById(R.id.personinfo);
52 layout_order = view.findViewById(R.id.layout_order); 56 layout_order = view.findViewById(R.id.layout_order);
53 layout_orderDetail = view.findViewById(R.id.layout_orderDetail); 57 layout_orderDetail = view.findViewById(R.id.layout_orderDetail);
54 layout_cache = view.findViewById(R.id.layout_cache); 58 layout_cache = view.findViewById(R.id.layout_cache);
55 layout_about = view.findViewById(R.id.layout_about); 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 layout_about.setOnClickListener(this); 61 layout_about.setOnClickListener(this);
  62 + layout_feedback.setOnClickListener(this);
59 layout_cache.setOnClickListener(this); 63 layout_cache.setOnClickListener(this);
60 childlayout.setOnClickListener(this); 64 childlayout.setOnClickListener(this);
61 personinfo.setOnClickListener(this); 65 personinfo.setOnClickListener(this);
@@ -65,8 +69,10 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -65,8 +69,10 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
65 user_name = view.findViewById(R.id.user_name); 69 user_name = view.findViewById(R.id.user_name);
66 user_mobile = view.findViewById(R.id.user_mobile); 70 user_mobile = view.findViewById(R.id.user_mobile);
67 tvExit = view.findViewById(R.id.tvExit); 71 tvExit = view.findViewById(R.id.tvExit);
  72 + tvExit.setVisibility(View.GONE);
68 tvExit.setOnClickListener(this); 73 tvExit.setOnClickListener(this);
69 binding_state = view.findViewById(R.id.binding_state); 74 binding_state = view.findViewById(R.id.binding_state);
  75 + layout_afterLogin.setVisibility(View.GONE);
70 if (AppConfig.ISBINDING) { 76 if (AppConfig.ISBINDING) {
71 binding_state.setText(""); 77 binding_state.setText("");
72 } 78 }
@@ -77,19 +83,25 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -77,19 +83,25 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
77 if (AppConfig.ISLOGIN) { 83 if (AppConfig.ISLOGIN) {
78 String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE); 84 String url = AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_IMAGE);
79 if (!TextUtils.isEmpty(url)) { 85 if (!TextUtils.isEmpty(url)) {
80 - GlideUtils.showImg(getContext(),user_photo,url); 86 + GlideUtils.showImg(getContext(), user_photo, url);
81 } else { 87 } else {
82 - GlideUtils.showImg(getContext(),user_photo,url); 88 + GlideUtils.showImg(getContext(), user_photo, url);
83 user_photo.setCornerRadius(20); 89 user_photo.setCornerRadius(20);
84 } 90 }
85 user_photo.setCornerRadius(20); 91 user_photo.setCornerRadius(20);
86 user_photo.setOval(true); 92 user_photo.setOval(true);
87 user_name.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_NAME)); 93 user_name.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_NAME));
88 user_mobile.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME)); 94 user_mobile.setText(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME));
  95 + top_layout.setBackgroundResource(R.drawable.backgroud_top);
89 user_mobile.setVisibility(View.VISIBLE); 96 user_mobile.setVisibility(View.VISIBLE);
90 - }else { 97 + layout_afterLogin.setVisibility(View.VISIBLE);
  98 + tvExit.setVisibility(View.VISIBLE);
  99 +
  100 + } else {
91 user_name.setVisibility(View.VISIBLE); 101 user_name.setVisibility(View.VISIBLE);
92 user_mobile.setVisibility(View.GONE); 102 user_mobile.setVisibility(View.GONE);
  103 + layout_afterLogin.setVisibility(View.GONE);
  104 + tvExit.setVisibility(View.GONE);
93 } 105 }
94 } 106 }
95 107
@@ -123,10 +135,12 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -123,10 +135,12 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
123 clearMyCache(); 135 clearMyCache();
124 break; 136 break;
125 case R.id.layout_about: 137 case R.id.layout_about:
126 - WebViewActivity.getInstance(getActivity(),AppConfig.BASE_URL_ORDER+"About.html",-1); 138 + WebViewActivity.getInstance(getActivity(), AppConfig.BASE_URL_ORDER + "About.html", -1);
127 break; 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 break; 144 break;
131 default: 145 default:
132 break; 146 break;
@@ -162,7 +176,7 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -162,7 +176,7 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
162 } 176 }
163 177
164 private void clearUerinfo() { 178 private void clearUerinfo() {
165 - if(AppConfig.ISLOGIN) { 179 + if (AppConfig.ISLOGIN) {
166 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_IMAGE, ""); 180 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_IMAGE, "");
167 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, ""); 181 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.USER_NAME, "");
168 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, ""); 182 AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, "");
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
@@ -3,14 +3,12 @@ package com.shunzhi.parent.ui.fragment; @@ -3,14 +3,12 @@ package com.shunzhi.parent.ui.fragment;
3 import android.os.Bundle; 3 import android.os.Bundle;
4 import android.support.annotation.NonNull; 4 import android.support.annotation.NonNull;
5 import android.support.annotation.Nullable; 5 import android.support.annotation.Nullable;
6 -import android.support.v4.view.ViewPager;  
7 import android.text.TextUtils; 6 import android.text.TextUtils;
8 import android.util.Log; 7 import android.util.Log;
9 import android.view.View; 8 import android.view.View;
10 import android.widget.ImageView; 9 import android.widget.ImageView;
11 import android.widget.TextView; 10 import android.widget.TextView;
12 11
13 -import com.bumptech.glide.Glide;  
14 import com.share.mvpsdk.base.BasePresenter; 12 import com.share.mvpsdk.base.BasePresenter;
15 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 13 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
16 import com.shunzhi.parent.AppConfig; 14 import com.shunzhi.parent.AppConfig;
@@ -28,6 +26,8 @@ import com.stx.xhb.xbanner.XBanner; @@ -28,6 +26,8 @@ import com.stx.xhb.xbanner.XBanner;
28 import java.util.ArrayList; 26 import java.util.ArrayList;
29 import java.util.List; 27 import java.util.List;
30 28
  29 +import cn.jzvd.JZVideoPlayerStandard;
  30 +
31 public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> 31 public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel>
32 implements ConsultContract.IConsultView { 32 implements ConsultContract.IConsultView {
33 33
@@ -35,6 +35,10 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -35,6 +35,10 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
35 35
36 TextView tvJump; 36 TextView tvJump;
37 37
  38 + boolean isQidong = false;
  39 +
  40 + JZVideoPlayerStandard jiecaoVideo;
  41 +
38 @Override 42 @Override
39 public int getLayoutId() { 43 public int getLayoutId() {
40 return R.layout.fragment_start; 44 return R.layout.fragment_start;
@@ -44,13 +48,30 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -44,13 +48,30 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
44 public void initUI(View view, @Nullable Bundle savedInstanceState) { 48 public void initUI(View view, @Nullable Bundle savedInstanceState) {
45 49
46 xBanner = view.findViewById(R.id.xBanner); 50 xBanner = view.findViewById(R.id.xBanner);
47 - tvJump=view.findViewById(R.id.tvJump);  
48 -  
49 - if (!TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START))) {  
50 - mPresenter.getBanners("0", "余杭区"); 51 + tvJump = view.findViewById(R.id.tvJump);
  52 + jiecaoVideo = view.findViewById(R.id.jiecaoVideo);
  53 + jiecaoVideo.tinyBackImageView.setVisibility(View.GONE);
  54 + jiecaoVideo.backButton.setVisibility(View.GONE);
  55 + jiecaoVideo.replayTextView.setVisibility(View.GONE);
  56 + jiecaoVideo.batteryLevel.setVisibility(View.GONE);
  57 + jiecaoVideo.thumbImageView.setVisibility(View.GONE);
  58 + jiecaoVideo.loadingProgressBar.setVisibility(View.GONE);
  59 +
  60 + isQidong = TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START));
  61 + if (isQidong) {
  62 + jiecaoVideo.setVisibility(View.VISIBLE);
  63 + xBanner.setVisibility(View.GONE);
51 AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1"); 64 AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1");
52 - } else mPresenter.getBanners("1","余杭区"); 65 +// mPresenter.getBanners("0", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district);
  66 + mPresenter.getBanners("0", "余杭区");
  67 + } else {
  68 + jiecaoVideo.setVisibility(View.GONE);
  69 + xBanner.setVisibility(View.VISIBLE);
  70 + mPresenter.getBanners("1", "余杭区");
  71 +// mPresenter.getBanners("1", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district);
  72 + }
53 73
  74 + tvJump=view.findViewById(R.id.tvJump);
54 75
55 tvJump.setOnClickListener(new View.OnClickListener() { 76 tvJump.setOnClickListener(new View.OnClickListener() {
56 @Override 77 @Override
@@ -90,26 +111,43 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -90,26 +111,43 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
90 111
91 private void initBannes(List<GuangGaoBean> guangGaoBeanList) { 112 private void initBannes(List<GuangGaoBean> guangGaoBeanList) {
92 try { 113 try {
93 - final List<String> imgUrl = new ArrayList<>();  
94 - List<String> describeList = new ArrayList<>();  
95 - for (int i = 0; i < guangGaoBeanList.size(); i++) {  
96 - imgUrl.add(AppConfig.BASE_URL_FILE+guangGaoBeanList.get(i).fileSrc);  
97 - describeList.add(guangGaoBeanList.get(i).describe);  
98 - }  
99 - xBanner.setData(imgUrl, describeList);  
100 - xBanner.stopAutoPlay();  
101 - xBanner.setmAutoPalyTime(10000); 114 + Log.d("66666","initBannes"+guangGaoBeanList);
  115 + if (isQidong) {
  116 + String fileUrl = "", describe = "";
  117 + for (int i = 0; i < guangGaoBeanList.size(); i++) {
  118 + if (guangGaoBeanList.get(i).fileSrc.contains(".mp4")) {
  119 + fileUrl = AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc;
  120 + describe = guangGaoBeanList.get(i).describe;
  121 + }
  122 + }
  123 + jiecaoVideo.setUp(fileUrl, JZVideoPlayerStandard.SCREEN_WINDOW_NORMAL, describe);
  124 + jiecaoVideo.startVideo();
  125 + } else {
  126 + final List<String> imgUrl = new ArrayList<>();
  127 + List<String> describeList = new ArrayList<>();
  128 + for (int i = 0; i < guangGaoBeanList.size(); i++) {
  129 + imgUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc);
  130 + describeList.add(guangGaoBeanList.get(i).describe);
  131 + }
  132 + xBanner.setData(imgUrl, describeList);
  133 + xBanner.stopAutoPlay();
  134 + xBanner.setmAutoPalyTime(10000);
102 // xBanner.setSlideScrollMode(View.OVER_SCROLL_NEVER); 135 // xBanner.setSlideScrollMode(View.OVER_SCROLL_NEVER);
103 - xBanner.setmAdapter(new XBanner.XBannerAdapter() {  
104 - @Override  
105 - public void loadBanner(XBanner banner, Object model, View view, int position) {  
106 - GlideUtils.showImg(getActivity(),(ImageView) view,imgUrl.get(position)); 136 + xBanner.setmAdapter(new XBanner.XBannerAdapter() {
  137 + @Override
  138 + public void loadBanner(XBanner banner, Object model, View view, int position) {
  139 + GlideUtils.showImg(getActivity(), (ImageView) view, imgUrl.get(position));
  140 + }
  141 + });
107 } 142 }
108 - });  
109 143
110 -  
111 - }catch (Exception e){ 144 + } catch (Exception e) {
112 e.printStackTrace(); 145 e.printStackTrace();
113 } 146 }
114 } 147 }
  148 +
  149 + @Override
  150 + public void onDestroy() {
  151 + super.onDestroy();
  152 + }
115 } 153 }
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultOneLevelFragment.java
@@ -5,6 +5,7 @@ import android.support.annotation.NonNull; @@ -5,6 +5,7 @@ import android.support.annotation.NonNull;
5 import android.support.annotation.Nullable; 5 import android.support.annotation.Nullable;
6 import android.support.v7.widget.LinearLayoutManager; 6 import android.support.v7.widget.LinearLayoutManager;
7 import android.support.v7.widget.RecyclerView; 7 import android.support.v7.widget.RecyclerView;
  8 +import android.text.TextUtils;
8 import android.view.LayoutInflater; 9 import android.view.LayoutInflater;
9 import android.view.View; 10 import android.view.View;
10 import android.view.ViewGroup; 11 import android.view.ViewGroup;
@@ -19,6 +20,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; @@ -19,6 +20,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter;
19 import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; 20 import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder;
20 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 21 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
21 import com.share.mvpsdk.utils.DisplayUtils; 22 import com.share.mvpsdk.utils.DisplayUtils;
  23 +import com.share.mvpsdk.utils.ToastUtils;
22 import com.shunzhi.parent.AppContext; 24 import com.shunzhi.parent.AppContext;
23 import com.shunzhi.parent.R; 25 import com.shunzhi.parent.R;
24 import com.shunzhi.parent.adapter.MyConsultAdapter; 26 import com.shunzhi.parent.adapter.MyConsultAdapter;
@@ -94,12 +96,15 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -94,12 +96,15 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
94 pageIndex = 1; 96 pageIndex = 1;
95 mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, pageIndex); 97 mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, pageIndex);
96 98
97 - mPresenter.getBanners("4", AppContext.getInstance().district); 99 + mPresenter.getBanners("3", AppContext.getInstance().district);
98 100
99 } 101 }
100 102
101 public void showSearchContent(String keyword) { 103 public void showSearchContent(String keyword) {
102 - mPresenter.getInformationTopic(keyword, AppContext.getInstance().district, channel, "0", 1); 104 + if (!TextUtils.isEmpty(keyword)){
  105 + myConsultBeanList.clear();
  106 + mPresenter.getInformationTopic(keyword, AppContext.getInstance().district, channel, "0", 1);
  107 + }
103 } 108 }
104 109
105 @NonNull 110 @NonNull
@@ -145,37 +150,42 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -145,37 +150,42 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
145 150
146 @Override 151 @Override
147 public void showConsultContent(List<ChannelContextBean> list) { 152 public void showConsultContent(List<ChannelContextBean> list) {
148 - myConsultBeanList.addAll(list);  
149 - if (myConsultAdapter == null) {  
150 - myConsultAdapter = new MyConsultAdapter(getActivity());  
151 - myConsultAdapter.addAll(myConsultBeanList);  
152 - recyclerViewConsultOne.setAdapter(myConsultAdapter);  
153 - } else {  
154 - myConsultAdapter.addAll(myConsultBeanList);  
155 - myConsultAdapter.notifyDataSetChanged();  
156 - } 153 +// Log.d("66666", "ChannelContextBean=" + list);
  154 + if (null != list) {
  155 + myConsultBeanList.addAll(list);
  156 + if (myConsultAdapter == null) {
  157 + myConsultAdapter = new MyConsultAdapter(getActivity());
  158 + myConsultAdapter.addAll(myConsultBeanList);
  159 + recyclerViewConsultOne.setAdapter(myConsultAdapter);
  160 + } else {
  161 + myConsultAdapter.addAll(myConsultBeanList);
  162 + myConsultAdapter.notifyDataSetChanged();
  163 + }
  164 + }else ToastUtils.showToast("没有数据");
157 } 165 }
158 166
159 @Override 167 @Override
160 public void showChannel(List<ChannelBean> list) { 168 public void showChannel(List<ChannelBean> list) {
161 - layout_control.removeAllViews();  
162 - for (int i = 0; i < list.size(); i++) {  
163 - TextAndImgShowView textAndImgShowView = new TextAndImgShowView(getActivity());  
164 - textAndImgShowView.setTextColor(R.color.textColor);  
165 - textAndImgShowView.setText(list.get(i).getChannelName());  
166 - textAndImgShowView.addImgs(list.get(i).getChannelImage());  
167 - textAndImgShowView.setSelect(true);  
168 - textAndImgShowView.setWidth(getActivity(), layout_control);  
169 - textAndImgShowView.setBackground(AttrsUtils.getAttrs(getActivity()).getDrawable(0));  
170 - textAndImgShowView.setTag(list.get(i));  
171 - textAndImgShowView.setOnClickListener(new View.OnClickListener() {  
172 - @Override  
173 - public void onClick(View view) {  
174 - ChannelBean channelBean = (ChannelBean) view.getTag();  
175 - ConsultTwoLevelActivity.getInstance(getActivity(), channelBean.getId() + "", channelBean.getChannelName());  
176 - }  
177 - });  
178 - layout_control.addView(textAndImgShowView); 169 + if (null != list) {
  170 + layout_control.removeAllViews();
  171 + for (int i = 0; i < list.size(); i++) {
  172 + TextAndImgShowView textAndImgShowView = new TextAndImgShowView(getActivity());
  173 + textAndImgShowView.setTextColor(R.color.textColor);
  174 + textAndImgShowView.setText(list.get(i).getChannelName());
  175 + textAndImgShowView.addImgs(list.get(i).getChannelImage());
  176 + textAndImgShowView.setSelect(true);
  177 + textAndImgShowView.setWidth(getActivity(), layout_control);
  178 + textAndImgShowView.setBackground(AttrsUtils.getAttrs(getActivity()).getDrawable(0));
  179 + textAndImgShowView.setTag(list.get(i));
  180 + textAndImgShowView.setOnClickListener(new View.OnClickListener() {
  181 + @Override
  182 + public void onClick(View view) {
  183 + ChannelBean channelBean = (ChannelBean) view.getTag();
  184 + ConsultTwoLevelActivity.getInstance(getActivity(), channelBean.getId() + "", channelBean.getChannelName());
  185 + }
  186 + });
  187 + layout_control.addView(textAndImgShowView);
  188 + }
179 } 189 }
180 } 190 }
181 191
@@ -212,13 +222,14 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -212,13 +222,14 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
212 } 222 }
213 223
214 @Override 224 @Override
215 - public void onBindViewHolder(final GuangGaoBean object, int position) { 225 + public void onBindViewHolder(final GuangGaoBean object, final int position) {
216 GlideUtils.showImg(mContext, iv_grally, object.fileSrc); 226 GlideUtils.showImg(mContext, iv_grally, object.fileSrc);
217 tv_grally_title.setText(object.describe + ""); 227 tv_grally_title.setText(object.describe + "");
218 iv_grally.setOnClickListener(new View.OnClickListener() { 228 iv_grally.setOnClickListener(new View.OnClickListener() {
219 @Override 229 @Override
220 public void onClick(View v) { 230 public void onClick(View v) {
221 - WebViewActivity.getInstance(mContext, object.url, -1); 231 +// WebViewActivity.getInstance(mContext, object.url, -1);
  232 + WebViewActivity.getInstance(getActivity(), object.url, -1);
222 } 233 }
223 }); 234 });
224 } 235 }
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultTwoLevelFragment.java
@@ -4,6 +4,7 @@ import android.os.Bundle; @@ -4,6 +4,7 @@ import android.os.Bundle;
4 import android.support.annotation.NonNull; 4 import android.support.annotation.NonNull;
5 import android.support.annotation.Nullable; 5 import android.support.annotation.Nullable;
6 import android.support.v7.widget.LinearLayoutManager; 6 import android.support.v7.widget.LinearLayoutManager;
  7 +import android.text.TextUtils;
7 import android.view.View; 8 import android.view.View;
8 import android.widget.TextView; 9 import android.widget.TextView;
9 10
@@ -90,7 +91,6 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -90,7 +91,6 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
90 91
91 @Override 92 @Override
92 public void showConsultContent(List<ChannelContextBean> list) { 93 public void showConsultContent(List<ChannelContextBean> list) {
93 - myConsultBeanList.clear();  
94 myConsultBeanList.addAll(list); 94 myConsultBeanList.addAll(list);
95 if (myConsultAdapter == null) myConsultAdapter = new MyConsultAdapter(getActivity()); 95 if (myConsultAdapter == null) myConsultAdapter = new MyConsultAdapter(getActivity());
96 if (null == recyclerView.getAdapter()) recyclerView.setAdapter(myConsultAdapter); 96 if (null == recyclerView.getAdapter()) recyclerView.setAdapter(myConsultAdapter);
@@ -108,4 +108,12 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -108,4 +108,12 @@ public class ConsultTwoLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
108 } 108 }
109 109
110 110
  111 + public void showSearch(String s) {
  112 +
  113 + if (!TextUtils.isEmpty(s)){
  114 + myConsultBeanList.clear();
  115 + mPresenter.getInformationTopic(s,AppContext.getInstance().district,channel,"0",1);
  116 + }
  117 +
  118 + }
111 } 119 }
app/src/main/java/com/shunzhi/parent/views/TextAndImgShowView.java
@@ -5,7 +5,6 @@ import android.content.Context; @@ -5,7 +5,6 @@ import android.content.Context;
5 import android.support.annotation.DrawableRes; 5 import android.support.annotation.DrawableRes;
6 import android.support.annotation.Nullable; 6 import android.support.annotation.Nullable;
7 import android.util.AttributeSet; 7 import android.util.AttributeSet;
8 -import android.util.Log;  
9 import android.view.View; 8 import android.view.View;
10 import android.widget.FrameLayout; 9 import android.widget.FrameLayout;
11 import android.widget.ImageView; 10 import android.widget.ImageView;
@@ -15,9 +14,7 @@ import android.widget.TextView; @@ -15,9 +14,7 @@ import android.widget.TextView;
15 import com.bumptech.glide.Glide; 14 import com.bumptech.glide.Glide;
16 import com.share.mvpsdk.utils.DisplayUtils; 15 import com.share.mvpsdk.utils.DisplayUtils;
17 import com.shunzhi.parent.AppConfig; 16 import com.shunzhi.parent.AppConfig;
18 -import com.shunzhi.parent.AppContext;  
19 import com.shunzhi.parent.R; 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,10 +81,12 @@ public class TextAndImgShowView extends LinearLayout {
84 81
85 public void setWidth(Activity activity, View layout_control) { 82 public void setWidth(Activity activity, View layout_control) {
86 // Log.d("66666", "layout_control=" + layout_control.getMeasuredWidth()); 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 params.width = (DisplayUtils.getScreenWidthPixels(activity) - 85 params.width = (DisplayUtils.getScreenWidthPixels(activity) -
89 DisplayUtils.dp2px(layout_control.getPaddingLeft() + layout_control.getPaddingRight() 86 DisplayUtils.dp2px(layout_control.getPaddingLeft() + layout_control.getPaddingRight()
90 )) / 4; 87 )) / 4;
91 layout.setLayoutParams(params); 88 layout.setLayoutParams(params);
  89 + LayoutParams params1 = new LayoutParams(52,52);
  90 + image.setLayoutParams(params1);
92 } 91 }
93 } 92 }
app/src/main/res/drawable-xhdpi/xiaoxi.png 0 → 100644

516 Bytes

app/src/main/res/layout/fragment_mine.xml
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 android:paddingTop="20dp" 17 android:paddingTop="20dp"
18 android:layout_width="match_parent" 18 android:layout_width="match_parent"
19 android:layout_height="180dp" 19 android:layout_height="180dp"
20 - android:background="@drawable/backgroud_top" 20 + android:background="@color/back_top"
21 android:orientation="vertical"> 21 android:orientation="vertical">
22 22
23 <TextView 23 <TextView
@@ -91,6 +91,7 @@ @@ -91,6 +91,7 @@
91 android:orientation="vertical"> 91 android:orientation="vertical">
92 92
93 <LinearLayout 93 <LinearLayout
  94 + android:id="@+id/layout_afterLogin"
94 android:layout_width="match_parent" 95 android:layout_width="match_parent"
95 android:layout_height="wrap_content" 96 android:layout_height="wrap_content"
96 android:background="@color/white" 97 android:background="@color/white"
@@ -103,17 +104,17 @@ @@ -103,17 +104,17 @@
103 104
104 <TextView 105 <TextView
105 android:layout_width="25dp" 106 android:layout_width="25dp"
106 - android:layout_height="20dp" 107 + android:layout_height="30dp"
107 android:layout_marginLeft="15dp" 108 android:layout_marginLeft="15dp"
108 android:layout_marginRight="30dp" 109 android:layout_marginRight="30dp"
109 - android:background="@drawable/tiaoxing" /> 110 + android:background="@drawable/xiaoxi" />
110 111
111 <TextView 112 <TextView
112 android:layout_width="wrap_content" 113 android:layout_width="wrap_content"
113 android:layout_height="wrap_content" 114 android:layout_height="wrap_content"
114 android:layout_gravity="center_vertical" 115 android:layout_gravity="center_vertical"
115 android:layout_weight="1" 116 android:layout_weight="1"
116 - android:text="我的订阅消息" 117 + android:text="消息"
117 android:textSize="@dimen/txtsize_title" /> 118 android:textSize="@dimen/txtsize_title" />
118 119
119 <TextView 120 <TextView
@@ -239,7 +240,7 @@ @@ -239,7 +240,7 @@
239 android:orientation="vertical"> 240 android:orientation="vertical">
240 241
241 <LinearLayout 242 <LinearLayout
242 - android:id="@+id/layoutAdvice" 243 + android:id="@+id/layout_feedback"
243 android:layout_width="match_parent" 244 android:layout_width="match_parent"
244 android:gravity="center_vertical" 245 android:gravity="center_vertical"
245 android:layout_height="?android:actionBarSize"> 246 android:layout_height="?android:actionBarSize">
app/src/main/res/layout/fragment_report.xml
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 android:drawablePadding="10dp" 22 android:drawablePadding="10dp"
23 android:drawableRight="@drawable/pull" 23 android:drawableRight="@drawable/pull"
24 android:text="" 24 android:text=""
  25 + android:visibility="gone"
25 android:textColor="@color/textColor" 26 android:textColor="@color/textColor"
26 android:textSize="@dimen/textSize16" /> 27 android:textSize="@dimen/textSize16" />
27 28
@@ -32,7 +33,7 @@ @@ -32,7 +33,7 @@
32 android:layout_weight="1" 33 android:layout_weight="1"
33 android:gravity="center_horizontal" 34 android:gravity="center_horizontal"
34 android:id="@+id/tvDate" 35 android:id="@+id/tvDate"
35 - android:text="2018年3月" 36 + android:text="报告"
36 android:textColor="@color/white" 37 android:textColor="@color/white"
37 android:textSize="@dimen/textSize18" /> 38 android:textSize="@dimen/textSize18" />
38 39
@@ -42,6 +43,7 @@ @@ -42,6 +43,7 @@
42 android:layout_height="wrap_content" 43 android:layout_height="wrap_content"
43 android:layout_gravity="center_vertical" 44 android:layout_gravity="center_vertical"
44 android:drawableRight="@drawable/screen" 45 android:drawableRight="@drawable/screen"
  46 + android:visibility="gone"
45 android:text="筛选" 47 android:text="筛选"
46 android:textColor="@color/textColor" 48 android:textColor="@color/textColor"
47 android:textSize="@dimen/textSize16" /> 49 android:textSize="@dimen/textSize16" />
@@ -52,7 +54,7 @@ @@ -52,7 +54,7 @@
52 android:layout_height="match_parent" 54 android:layout_height="match_parent"
53 android:textSize="@dimen/size_dp_16" 55 android:textSize="@dimen/size_dp_16"
54 android:textColor="@color/xueqing_blue" 56 android:textColor="@color/xueqing_blue"
55 - android:text="没有绑定孩子,\n请去个人中心绑定孩子" 57 + android:text="功能暂不开放"
56 android:gravity="center" 58 android:gravity="center"
57 android:lineSpacingExtra="@dimen/size_dp_5" 59 android:lineSpacingExtra="@dimen/size_dp_5"
58 android:id="@+id/tvNoData" 60 android:id="@+id/tvNoData"
@@ -61,6 +63,7 @@ @@ -61,6 +63,7 @@
61 <LinearLayout 63 <LinearLayout
62 android:layout_width="match_parent" 64 android:layout_width="match_parent"
63 android:layout_height="match_parent" 65 android:layout_height="match_parent"
  66 + android:visibility="gone"
64 android:orientation="vertical"> 67 android:orientation="vertical">
65 68
66 <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"--> 69 <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"-->
app/src/main/res/layout/fragment_start.xml
@@ -11,6 +11,11 @@ @@ -11,6 +11,11 @@
11 android:id="@+id/xBanner" 11 android:id="@+id/xBanner"
12 ></com.stx.xhb.xbanner.XBanner> 12 ></com.stx.xhb.xbanner.XBanner>
13 13
  14 + <cn.jzvd.JZVideoPlayerStandard
  15 + android:id="@+id/jiecaoVideo"
  16 + android:layout_width="match_parent"
  17 + android:layout_height="match_parent"></cn.jzvd.JZVideoPlayerStandard>
  18 +
14 <TextView 19 <TextView
15 android:id="@+id/tvJump" 20 android:id="@+id/tvJump"
16 android:layout_width="wrap_content" 21 android:layout_width="wrap_content"
app/src/main/res/layout/layout_consult_content.xml
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent" 3 android:layout_width="match_parent"
4 - android:layout_height="wrap_content" 4 + android:layout_height="@dimen/size_dp_100"
5 android:layout_marginBottom="@dimen/size_dp_10" 5 android:layout_marginBottom="@dimen/size_dp_10"
6 android:orientation="vertical"> 6 android:orientation="vertical">
7 7
@@ -17,15 +17,16 @@ @@ -17,15 +17,16 @@
17 android:layout_weight="4" 17 android:layout_weight="4"
18 android:elevation="@dimen/size_dp_3" 18 android:elevation="@dimen/size_dp_3"
19 android:orientation="vertical" 19 android:orientation="vertical"
20 - android:padding="@dimen/size_dp_5"> 20 + android:padding="@dimen/size_dp_4">
21 21
22 <TextView 22 <TextView
23 android:id="@+id/tvConsultTitle" 23 android:id="@+id/tvConsultTitle"
24 android:layout_width="match_parent" 24 android:layout_width="match_parent"
25 - android:layout_height="wrap_content" 25 + android:layout_height="0dp"
  26 + android:layout_weight="2"
26 android:ellipsize="end" 27 android:ellipsize="end"
27 - android:gravity="center_vertical"  
28 android:maxLines="2" 28 android:maxLines="2"
  29 + android:layout_gravity="top"
29 android:text="学校初一段家长统一测试使用家长慧得到良好反馈评价" 30 android:text="学校初一段家长统一测试使用家长慧得到良好反馈评价"
30 android:textColor="@color/textColor" 31 android:textColor="@color/textColor"
31 android:textSize="@dimen/textSize14" /> 32 android:textSize="@dimen/textSize14" />
@@ -33,9 +34,11 @@ @@ -33,9 +34,11 @@
33 <TextView 34 <TextView
34 android:id="@+id/tvConsultContent" 35 android:id="@+id/tvConsultContent"
35 android:layout_width="match_parent" 36 android:layout_width="match_parent"
36 - android:layout_height="wrap_content" 37 + android:layout_height="0dp"
  38 + android:layout_weight="1"
37 android:layout_marginTop="@dimen/size_dp_5" 39 android:layout_marginTop="@dimen/size_dp_5"
38 android:ellipsize="end" 40 android:ellipsize="end"
  41 + android:layout_gravity="center_vertical"
39 android:gravity="center_vertical" 42 android:gravity="center_vertical"
40 android:maxLines="2" 43 android:maxLines="2"
41 android:singleLine="true" 44 android:singleLine="true"
@@ -44,15 +47,19 @@ @@ -44,15 +47,19 @@
44 android:textSize="@dimen/textSize14" /> 47 android:textSize="@dimen/textSize14" />
45 48
46 <FrameLayout 49 <FrameLayout
  50 + android:layout_gravity="bottom"
47 android:layout_width="match_parent" 51 android:layout_width="match_parent"
48 - android:layout_height="wrap_content" 52 + android:layout_height="0dp"
  53 + android:layout_weight="1"
49 android:layout_marginTop="@dimen/size_dp_5"> 54 android:layout_marginTop="@dimen/size_dp_5">
50 55
51 <RelativeLayout 56 <RelativeLayout
  57 + android:layout_gravity="bottom"
52 android:layout_width="match_parent" 58 android:layout_width="match_parent"
53 android:layout_height="wrap_content"> 59 android:layout_height="wrap_content">
54 60
55 <TextView 61 <TextView
  62 + android:layout_centerVertical="true"
56 android:id="@+id/tvPingLunNums" 63 android:id="@+id/tvPingLunNums"
57 style="@style/TextView_Wrap_16" 64 style="@style/TextView_Wrap_16"
58 android:layout_gravity="center_vertical" 65 android:layout_gravity="center_vertical"
@@ -72,12 +79,15 @@ @@ -72,12 +79,15 @@
72 </LinearLayout> 79 </LinearLayout>
73 80
74 <ImageView 81 <ImageView
  82 + android:layout_gravity="center"
75 android:id="@+id/iv_consult" 83 android:id="@+id/iv_consult"
76 android:layout_width="0dp" 84 android:layout_width="0dp"
77 android:layout_height="match_parent" 85 android:layout_height="match_parent"
78 - android:layout_margin="@dimen/size_dp_2" 86 + android:layout_margin="@dimen/size_dp_4"
79 android:layout_weight="2" 87 android:layout_weight="2"
  88 + android:scaleType="fitXY"
80 android:src="@color/xueqing_blue" /> 89 android:src="@color/xueqing_blue" />
  90 +
81 </LinearLayout> 91 </LinearLayout>
82 92
83 <FrameLayout 93 <FrameLayout
app/src/main/res/layout/text_and_img_show.xml
@@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
16 16
17 <ImageView 17 <ImageView
18 android:id="@+id/image" 18 android:id="@+id/image"
19 - android:layout_width="wrap_content"  
20 - android:layout_height="wrap_content" 19 + android:layout_width="@dimen/size_dp_50"
  20 + android:layout_height="@dimen/size_dp_50"
21 android:scaleType="fitXY" 21 android:scaleType="fitXY"
22 /> 22 />
23 23
app/src/main/res/menu/bottom_navigationview.xml
@@ -3,13 +3,13 @@ @@ -3,13 +3,13 @@
3 3
4 <item android:id="@+id/menu_item_index" 4 <item android:id="@+id/menu_item_index"
5 android:icon="@drawable/selector_ceping" 5 android:icon="@drawable/selector_ceping"
6 - android:title="测评" 6 + android:title="慧测慧练"
7 ></item> 7 ></item>
8 8
9 9
10 <item android:id="@+id/menu_item_consult" 10 <item android:id="@+id/menu_item_consult"
11 android:icon="@drawable/selector_consult" 11 android:icon="@drawable/selector_consult"
12 - android:title="咨询频道" 12 + android:title="资讯频道"
13 ></item> 13 ></item>
14 14
15 15
app/src/main/res/values/colors.xml
@@ -9,9 +9,9 @@ @@ -9,9 +9,9 @@
9 <color name="bottomline">#B8B8B9</color> 9 <color name="bottomline">#B8B8B9</color>
10 <color name="bg_main">#F0EFF5</color> 10 <color name="bg_main">#F0EFF5</color>
11 <color name="textRed">#FC5B6A</color> 11 <color name="textRed">#FC5B6A</color>
12 - <color name="back_top">#C6DAFF</color> 12 + <color name="back_top">#A6DAFF</color>
13 <color name="textBlue">#ACC9FC</color> 13 <color name="textBlue">#ACC9FC</color>
14 - <color name="titleColor">#C6DAFF</color> 14 + <color name="titleColor">#A6DAFF</color>
15 <color name="bgColor">#F0EFF5</color> 15 <color name="bgColor">#F0EFF5</color>
16 <color name="textColor">#494947</color> 16 <color name="textColor">#494947</color>
17 <color name="xueqing_blue">#ABC9FF</color> 17 <color name="xueqing_blue">#ABC9FF</color>
app/src/main/res/values/strings.xml
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <!-- TODO: Remove or change this placeholder text --> 4 <!-- TODO: Remove or change this placeholder text -->
5 <string name="hello_blank_fragment">Hello blank fragment</string> 5 <string name="hello_blank_fragment">Hello blank fragment</string>
6 6
7 - <string name="ceping">测评</string> 7 + <string name="ceping">慧测慧练</string>
8 <string name="consult_huati">咨询话题</string> 8 <string name="consult_huati">咨询话题</string>
9 <string name="order_detail">订单详情</string> 9 <string name="order_detail">订单详情</string>
10 </resources> 10 </resources>