Commit 41f159b593fb8d86f85de7a63feda76a16d0ea20

Authored by 段合江
2 parents 84aba162 0cbb0554

Merge branch 'developer' into wwx

Showing 50 changed files with 1402 additions and 344 deletions   Show diff stats
.idea/modules.xml
@@ -4,9 +4,9 @@ @@ -4,9 +4,9 @@
4 <modules> 4 <modules>
5 <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> 5 <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
6 <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" /> 6 <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" />
7 - <module fileurl="file://$PROJECT_DIR$/parentWorkHolper.iml" filepath="$PROJECT_DIR$/parentWorkHolper.iml" />  
8 - <module fileurl="file://F:\parentwork\parentWorkHolper.iml" filepath="F:\parentwork\parentWorkHolper.iml" />  
9 <module fileurl="file://E:\parentwork\parentWorkHolper.iml" filepath="E:\parentwork\parentWorkHolper.iml" /> 7 <module fileurl="file://E:\parentwork\parentWorkHolper.iml" filepath="E:\parentwork\parentWorkHolper.iml" />
  8 + <module fileurl="file://F:\parentwork\parentWorkHolper.iml" filepath="F:\parentwork\parentWorkHolper.iml" />
  9 + <module fileurl="file://$PROJECT_DIR$/parentwork.iml" filepath="$PROJECT_DIR$/parentwork.iml" />
10 <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" /> 10 <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" />
11 <module fileurl="file://$PROJECT_DIR$/processor/processor.iml" filepath="$PROJECT_DIR$/processor/processor.iml" /> 11 <module fileurl="file://$PROJECT_DIR$/processor/processor.iml" filepath="$PROJECT_DIR$/processor/processor.iml" />
12 <module fileurl="file://$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" filepath="$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" /> 12 <module fileurl="file://$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" filepath="$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" />
app/build.gradle
@@ -16,8 +16,8 @@ android { @@ -16,8 +16,8 @@ android {
16 applicationId "com.shunzhi.parent" 16 applicationId "com.shunzhi.parent"
17 minSdkVersion 16 17 minSdkVersion 16
18 targetSdkVersion 26 18 targetSdkVersion 26
19 - versionCode 1  
20 - versionName "1.0" 19 + versionCode 102
  20 + versionName "1.0.2"
21 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 21 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
22 javaCompileOptions { 22 javaCompileOptions {
23 annotationProcessorOptions { 23 annotationProcessorOptions {
@@ -52,15 +52,16 @@ task fileCheckTask() { @@ -52,15 +52,16 @@ task fileCheckTask() {
52 //此方法执行以后会删除所有的version.sql文件,不能主动添加sql语句 52 //此方法执行以后会删除所有的version.sql文件,不能主动添加sql语句
53 //如果已经定义、实现的注解不能满足更新要求,请自己添加sql语句,并且将下面删除文件的语句注释 53 //如果已经定义、实现的注解不能满足更新要求,请自己添加sql语句,并且将下面删除文件的语句注释
54 //注意 注释以后不要打开(写这个task是为了试验) 54 //注意 注释以后不要打开(写这个task是为了试验)
55 - doLast { 55 + /*doLast {
56 File file = new File(rootDir.getAbsolutePath() + "\\app\\src\\main\\assets\\migrations") 56 File file = new File(rootDir.getAbsolutePath() + "\\app\\src\\main\\assets\\migrations")
57 File[] files = file.listFiles() 57 File[] files = file.listFiles()
58 - for (int i = 0; i < files.length; i++) {  
59 - File file1 = files[i]  
60 - println("delete : "+file1.getAbsolutePath())  
61 - file1.delete()  
62 - }  
63 - } 58 + if (null != files)
  59 + for (int i = 0; i < files.length; i++) {
  60 + File file1 = files[i]
  61 + println("delete : " + file1.getAbsolutePath())
  62 + file1.delete()
  63 + }
  64 + }*/
64 } 65 }
65 66
66 afterEvaluate { 67 afterEvaluate {
@@ -80,6 +81,7 @@ greendao { @@ -80,6 +81,7 @@ greendao {
80 schemaVersion 1//数据库版本升级 81 schemaVersion 1//数据库版本升级
81 } 82 }
82 dependencies { 83 dependencies {
  84 +
83 implementation fileTree(include: ['*.jar'], dir: 'libs') 85 implementation fileTree(include: ['*.jar'], dir: 'libs')
84 implementation 'com.android.support:appcompat-v7:26.1.0' 86 implementation 'com.android.support:appcompat-v7:26.1.0'
85 implementation 'com.android.support.constraint:constraint-layout:1.0.2' 87 implementation 'com.android.support.constraint:constraint-layout:1.0.2'
app/libs/processor.jar
No preview for this file type
app/src/main/AndroidManifest.xml
@@ -117,6 +117,17 @@ @@ -117,6 +117,17 @@
117 android:name="com.amap.api.v2.apikey" 117 android:name="com.amap.api.v2.apikey"
118 android:value="1d130afb822d8a1019e6592cbaf10bcc" /> 118 android:value="1d130afb822d8a1019e6592cbaf10bcc" />
119 119
  120 +
  121 + <provider
  122 + android:authorities="com.shunzhi.parent.fileprovider"
  123 + android:name="android.support.v4.content.FileProvider"
  124 + android:grantUriPermissions="true"
  125 + android:exported="false">
  126 + <meta-data
  127 + android:name="android.support.FILE_PROVIDER_PATHS"
  128 + android:resource="@xml/filepaths"/>
  129 + </provider>
  130 +
120 <activity 131 <activity
121 android:name=".ui.activity.StartActivity" 132 android:name=".ui.activity.StartActivity"
122 android:launchMode="singleInstance" 133 android:launchMode="singleInstance"
app/src/main/java/com/shunzhi/parent/AppConfig.java
@@ -47,7 +47,7 @@ public class AppConfig { @@ -47,7 +47,7 @@ public class AppConfig {
47 public static String BASE_URL="http://campus.myjxt.com/"; 47 public static String BASE_URL="http://campus.myjxt.com/";
48 public static String BASE_URL_ORDER="http://parent.myjxt.com/"; 48 public static String BASE_URL_ORDER="http://parent.myjxt.com/";
49 public static String BASE_URL_FILE="http://manage.myjxt.com"; 49 public static String BASE_URL_FILE="http://manage.myjxt.com";
50 - public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3"; 50 +// public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3";
51 51
52 52
53 //默认日志保存的路径 53 //默认日志保存的路径
app/src/main/java/com/shunzhi/parent/adapter/DeyuDetialAdapter.java
1 package com.shunzhi.parent.adapter; 1 package com.shunzhi.parent.adapter;
2 2
3 import android.content.Context; 3 import android.content.Context;
4 -import android.content.Intent;  
5 import android.view.LayoutInflater; 4 import android.view.LayoutInflater;
6 import android.view.View; 5 import android.view.View;
7 import android.view.ViewGroup; 6 import android.view.ViewGroup;
  7 +import android.widget.TextView;
8 8
9 import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; 9 import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter;
10 import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; 10 import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder;
@@ -32,21 +32,66 @@ public class DeyuDetialAdapter extends BaseRecyclerViewAdapter&lt;DeyuDetialBean&gt; { @@ -32,21 +32,66 @@ public class DeyuDetialAdapter extends BaseRecyclerViewAdapter&lt;DeyuDetialBean&gt; {
32 32
33 private class DeyuDetialViewHolder extends BaseRecyclerViewHolder<DeyuDetialBean> { 33 private class DeyuDetialViewHolder extends BaseRecyclerViewHolder<DeyuDetialBean> {
34 34
  35 + TextView txt_name,jidian,paiming,pingjia;
35 36
36 public DeyuDetialViewHolder(View itemView) { 37 public DeyuDetialViewHolder(View itemView) {
37 super(itemView); 38 super(itemView);
  39 + txt_name=itemView.findViewById(R.id.txt_name);
  40 + jidian=itemView.findViewById(R.id.jidian);
  41 + paiming=itemView.findViewById(R.id.paiming);
  42 + pingjia=itemView.findViewById(R.id.pingjia);
38 43
39 } 44 }
40 45
41 @Override 46 @Override
42 public void onBindViewHolder(final DeyuDetialBean object, int position) { 47 public void onBindViewHolder(final DeyuDetialBean object, int position) {
  48 + txt_name.setText(object.getSceneName());
  49 + jidian.setText("绩点:"+String.format("%.1f", object.getPointScore())+" "+object.getRisePoint());
  50 + String pStr=getPaiming(object.getRanking());
  51 + paiming.setText("排名:"+pStr+" "+object.getRiseRanking());
  52 + pingjia.setText(object.getEvaluationGrade());
  53 +
  54 +
43 itemView.setOnClickListener(new View.OnClickListener() { 55 itemView.setOnClickListener(new View.OnClickListener() {
44 @Override 56 @Override
45 public void onClick(View v) { 57 public void onClick(View v) {
46 - mContext.startActivity(new Intent().setClass(mContext, ReportSceneActivity.class)); 58 + ReportSceneActivity.getInstance(mContext,object.getSceneId());
47 } 59 }
48 }); 60 });
49 61
50 } 62 }
51 } 63 }
  64 +
  65 + public String getPaiming(float ranking) {
  66 + String s=String.valueOf((int)ranking);
  67 +
  68 + return "第"+toChinese(s)+"名";
  69 + }
  70 +
  71 +
  72 + public String toChinese(String string) {
  73 + String[] s1 = { "零", "一", "二", "三", "四", "五", "六", "七", "八", "九" };
  74 + String[] s2 = { "十", "百", "千", "万", "十", "百", "千", "亿", "十", "百", "千" };
  75 +
  76 + String result = "";
  77 +
  78 + int n = string.length();
  79 + for (int i = 0; i < n; i++) {
  80 +
  81 + int num = string.charAt(i) - '0';
  82 +
  83 + if (i != n - 1 && num != 0) {
  84 + result += s1[num] + s2[n - 2 - i];
  85 + } else {
  86 + result += s1[num];
  87 + }
  88 + System.out.println(" "+result);
  89 + }
  90 +
  91 + System.out.println("----------------");
  92 + System.out.println(result);
  93 + return result;
  94 +
  95 + }
  96 +
52 } 97 }
app/src/main/java/com/shunzhi/parent/adapter/ReportAdapter.java
@@ -3,6 +3,8 @@ package com.shunzhi.parent.adapter; @@ -3,6 +3,8 @@ package com.shunzhi.parent.adapter;
3 3
4 import android.content.Context; 4 import android.content.Context;
5 import android.content.Intent; 5 import android.content.Intent;
  6 +import android.support.v7.widget.LinearLayoutManager;
  7 +import android.support.v7.widget.RecyclerView;
6 import android.view.LayoutInflater; 8 import android.view.LayoutInflater;
7 import android.view.View; 9 import android.view.View;
8 import android.view.ViewGroup; 10 import android.view.ViewGroup;
@@ -13,6 +15,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; @@ -13,6 +15,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder;
13 import com.shunzhi.parent.R; 15 import com.shunzhi.parent.R;
14 import com.shunzhi.parent.bean.ReportBean; 16 import com.shunzhi.parent.bean.ReportBean;
15 import com.shunzhi.parent.ui.activity.report.ReportDetialActivity; 17 import com.shunzhi.parent.ui.activity.report.ReportDetialActivity;
  18 +import com.shunzhi.parent.views.CustomLinearLayoutManager;
16 19
17 /** 20 /**
18 * Created by Administrator on 2018/3/9 0009. 21 * Created by Administrator on 2018/3/9 0009.
@@ -28,6 +31,14 @@ public class ReportAdapter extends BaseRecyclerViewAdapter&lt;ReportBean&gt; { @@ -28,6 +31,14 @@ public class ReportAdapter extends BaseRecyclerViewAdapter&lt;ReportBean&gt; {
28 31
29 32
30 @Override 33 @Override
  34 + public void onAttachedToRecyclerView(RecyclerView recyclerView) {
  35 + super.onAttachedToRecyclerView(recyclerView);
  36 + recyclerView.setLayoutManager(new CustomLinearLayoutManager(context,
  37 + LinearLayoutManager.VERTICAL, false));
  38 + recyclerView.setHasFixedSize(true);
  39 + }
  40 +
  41 + @Override
31 public BaseRecyclerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 42 public BaseRecyclerViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
32 View view = LayoutInflater.from(context).inflate(R.layout.item_report_deyu, parent,false); 43 View view = LayoutInflater.from(context).inflate(R.layout.item_report_deyu, parent,false);
33 return new MyViewHolder(view); 44 return new MyViewHolder(view);
app/src/main/java/com/shunzhi/parent/adapter/ReportSceneAdapter.java
@@ -5,6 +5,7 @@ import android.view.LayoutInflater; @@ -5,6 +5,7 @@ import android.view.LayoutInflater;
5 import android.view.View; 5 import android.view.View;
6 import android.view.ViewGroup; 6 import android.view.ViewGroup;
7 import android.widget.LinearLayout; 7 import android.widget.LinearLayout;
  8 +import android.widget.TextView;
8 9
9 import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; 10 import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter;
10 import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; 11 import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder;
@@ -32,20 +33,31 @@ public class ReportSceneAdapter extends BaseRecyclerViewAdapter&lt;SceneDetialBean&gt; @@ -32,20 +33,31 @@ public class ReportSceneAdapter extends BaseRecyclerViewAdapter&lt;SceneDetialBean&gt;
32 private class MyViewHolder extends BaseRecyclerViewHolder<SceneDetialBean> { 33 private class MyViewHolder extends BaseRecyclerViewHolder<SceneDetialBean> {
33 34
34 LinearLayout item_view; 35 LinearLayout item_view;
  36 + TextView leavel,txt_info,count,name,time;
35 37
36 public MyViewHolder(View view) { 38 public MyViewHolder(View view) {
37 super(view); 39 super(view);
38 item_view = view.findViewById(R.id.item_view); 40 item_view = view.findViewById(R.id.item_view);
  41 + leavel=view.findViewById(R.id.leavel);
  42 + txt_info=view.findViewById(R.id.txt_info);
  43 + count=view.findViewById(R.id.count);
  44 + name=view.findViewById(R.id.name);
  45 + time=view.findViewById(R.id.time);
39 } 46 }
40 47
41 @Override 48 @Override
42 public void onBindViewHolder(SceneDetialBean object, int position) { 49 public void onBindViewHolder(SceneDetialBean object, int position) {
43 - item_view.setOnClickListener(new View.OnClickListener() {  
44 - @Override  
45 - public void onClick(View v) {  
46 -  
47 - }  
48 - }); 50 + leavel.setText(object.getDimensionName());
  51 + txt_info.setText(object.getSceneName()+"-"+object.getLableName());
  52 + count.setText(object.getDimensionScore() );
  53 + name.setText(object.getStudentName());
  54 + time.setText(object.getRecordTime());
  55 +// item_view.setOnClickListener(new View.OnClickListener() {
  56 +// @Override
  57 +// public void onClick(View v) {
  58 +//
  59 +// }
  60 +// });
49 } 61 }
50 62
51 } 63 }
app/src/main/java/com/shunzhi/parent/api/ReportApi.java 0 → 100644
@@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
  1 +package com.shunzhi.parent.api;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +
  5 +import io.reactivex.Observable;
  6 +import retrofit2.http.Field;
  7 +import retrofit2.http.FormUrlEncoded;
  8 +import retrofit2.http.POST;
  9 +
  10 +/**
  11 + * Created by Administrator on 2018/4/3 0003.
  12 + */
  13 +
  14 +public interface ReportApi {
  15 + @FormUrlEncoded
  16 + @POST("api/EvaluationLabel/GetSceneAnalysisDetails")
  17 + Observable<JsonObject> getSceneDetial(@Field("sceneId") int sceneId,
  18 + @Field("screenId") int screenId,
  19 + @Field("ObjectId") String ObjectId,
  20 + @Field("SchoolId") int SchoolId,
  21 + @Field("ObjectType") int ObjectType,
  22 + @Field("startDate") String startDate,
  23 + @Field("endDate") String endDate);
  24 +
  25 + @FormUrlEncoded
  26 + @POST("api/EvaluationLabel/Getstatisticsanalytical")
  27 + Observable<JsonObject> getReportDetial(@Field("screenId") int screenId,
  28 + @Field("schoolId") int SchoolId,
  29 + @Field("objectType") int ObjectType,
  30 + @Field("classId") String classId,
  31 + @Field("startDate") String startDate,
  32 + @Field("endDate") String endDate);
  33 +}
app/src/main/java/com/shunzhi/parent/bean/report/DeyuDetialBean.java
@@ -5,4 +5,77 @@ package com.shunzhi.parent.bean.report; @@ -5,4 +5,77 @@ package com.shunzhi.parent.bean.report;
5 */ 5 */
6 6
7 public class DeyuDetialBean { 7 public class DeyuDetialBean {
  8 + float pointScore;
  9 + String risePoint;
  10 + float ranking;
  11 + String riseRanking;
  12 + String evaluationGrade;
  13 + int sceneId;
  14 + String sceneName;
  15 +
  16 +
  17 + public String getSceneName() {
  18 + return sceneName;
  19 + }
  20 +
  21 + public void setSceneName(String sceneName) {
  22 + this.sceneName = sceneName;
  23 + }
  24 +
  25 + public float getPointScore() {
  26 + return pointScore;
  27 + }
  28 +
  29 + public void setPointScore(float pointScore) {
  30 + this.pointScore = pointScore;
  31 + }
  32 +
  33 + public String getRisePoint() {
  34 + return risePoint;
  35 + }
  36 +
  37 + public void setRisePoint(String risePoint) {
  38 + this.risePoint = risePoint;
  39 + }
  40 +
  41 + public float getRanking() {
  42 + return ranking;
  43 + }
  44 +
  45 + public void setRanking(float ranking) {
  46 + this.ranking = ranking;
  47 + }
  48 +
  49 + public String getRiseRanking() {
  50 + return riseRanking;
  51 + }
  52 +
  53 + public void setRiseRanking(String riseRanking) {
  54 + this.riseRanking = riseRanking;
  55 + }
  56 +
  57 + public String getEvaluationGrade() {
  58 + return evaluationGrade;
  59 + }
  60 +
  61 + public void setEvaluationGrade(String evaluationGrade) {
  62 + this.evaluationGrade = evaluationGrade;
  63 + }
  64 +
  65 + public int getSceneId() {
  66 + return sceneId;
  67 + }
  68 +
  69 + public void setSceneId(int sceneId) {
  70 + this.sceneId = sceneId;
  71 + }
8 } 72 }
  73 +
  74 +//score":0.0,
  75 +// "pointScore":2.6624999046325684,
  76 +// "risePoint":"同期保持一致",
  77 +// "ranking":1.0,
  78 +// "riseRanking":"与同期保持一致",
  79 +// "evaluationGrade":"E",
  80 +// "sceneId":10,
  81 +// "sceneName":"好人好事"
9 \ No newline at end of file 82 \ No newline at end of file
app/src/main/java/com/shunzhi/parent/bean/report/SceneDetialBean.java
1 package com.shunzhi.parent.bean.report; 1 package com.shunzhi.parent.bean.report;
2 2
  3 +import java.io.Serializable;
  4 +
3 /** 5 /**
4 * Created by Administrator on 2018/3/30 0030. 6 * Created by Administrator on 2018/3/30 0030.
5 */ 7 */
6 8
7 -public class SceneDetialBean { 9 +public class SceneDetialBean implements Serializable{
  10 +String describe;
  11 +String lableName;
  12 +String dimensionName;
  13 +String dimensionScore;
  14 +String sceneName;
  15 +String studentName;
  16 +String className;
  17 +String recordTime;
  18 +String score;
  19 +
  20 +
  21 + public String getDimensionScore() {
  22 + return dimensionScore;
  23 + }
  24 +
  25 + public void setDimensionScore(String dimensionScore) {
  26 + this.dimensionScore = dimensionScore;
  27 + }
  28 +
  29 + public String getScore() {
  30 + return score;
  31 + }
  32 +
  33 + public void setScore(String score) {
  34 + this.score = score;
  35 + }
  36 +
  37 + public String getDescribe() {
  38 + return describe;
  39 + }
  40 +
  41 + public void setDescribe(String describe) {
  42 + this.describe = describe;
  43 + }
  44 +
  45 + public String getLableName() {
  46 + return lableName;
  47 + }
  48 +
  49 + public void setLableName(String lableName) {
  50 + this.lableName = lableName;
  51 + }
  52 +
  53 + public String getDimensionName() {
  54 + return dimensionName;
  55 + }
  56 +
  57 + public void setDimensionName(String dimensionName) {
  58 + this.dimensionName = dimensionName;
  59 + }
  60 +
  61 + public String getSceneName() {
  62 + return sceneName;
  63 + }
  64 +
  65 + public void setSceneName(String sceneName) {
  66 + this.sceneName = sceneName;
  67 + }
  68 +
  69 + public String getStudentName() {
  70 + return studentName;
  71 + }
  72 +
  73 + public void setStudentName(String studentName) {
  74 + this.studentName = studentName;
  75 + }
  76 +
  77 + public String getClassName() {
  78 + return className;
  79 + }
  80 +
  81 + public void setClassName(String className) {
  82 + this.className = className;
  83 + }
  84 +
  85 + public String getRecordTime() {
  86 + return recordTime;
  87 + }
  88 +
  89 + public void setRecordTime(String recordTime) {
  90 + this.recordTime = recordTime;
  91 + }
  92 +
  93 +
8 } 94 }
app/src/main/java/com/shunzhi/parent/contract/report/ReportContract.java
@@ -21,7 +21,7 @@ public interface ReportContract { @@ -21,7 +21,7 @@ public interface ReportContract {
21 } 21 }
22 interface IReportModel extends IBaseModel{ 22 interface IReportModel extends IBaseModel{
23 Observable<ReportBean> getReportResult(); 23 Observable<ReportBean> getReportResult();
24 - void getReports(); 24 +
25 } 25 }
26 interface IReportView extends IBaseView{ 26 interface IReportView extends IBaseView{
27 void UpdateList(List<ReportBean>list); 27 void UpdateList(List<ReportBean>list);
app/src/main/java/com/shunzhi/parent/contract/report/ReportDetialContract.java 0 → 100644
@@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
  1 +package com.shunzhi.parent.contract.report;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +import com.share.mvpsdk.base.BasePresenter;
  5 +import com.share.mvpsdk.base.IBaseModel;
  6 +import com.share.mvpsdk.base.IBaseView;
  7 +import com.shunzhi.parent.bean.report.DeyuDetialBean;
  8 +
  9 +import java.util.List;
  10 +
  11 +import io.reactivex.Observable;
  12 +
  13 +/**
  14 + * Created by Administrator on 2018/4/3 0003.
  15 + */
  16 +
  17 +public interface ReportDetialContract {
  18 + abstract class ReportDetialPresenter extends BasePresenter<IReportDetialModel,IReportDetialView>{
  19 + public abstract void reportDetialResult(int screenId,int schoolId,String classId,int objectType,String startDate,String endDate);
  20 + }
  21 + interface IReportDetialModel extends IBaseModel {
  22 + Observable<JsonObject> getReportDetialResult(int screenId, int schoolId,String classId,int objectType, String startDate, String endDate);
  23 + }
  24 + interface IReportDetialView extends IBaseView {
  25 + void showDetialList(List<DeyuDetialBean> list);
  26 + void showDetialInfo(float rank, String scoree, String bijiao1,String bijiao2,String bijiao3,String bijiao4,String describe);
  27 +
  28 + }
  29 +}
app/src/main/java/com/shunzhi/parent/contract/report/ReportSceneContract.java 0 → 100644
@@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
  1 +package com.shunzhi.parent.contract.report;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +import com.share.mvpsdk.base.BasePresenter;
  5 +import com.share.mvpsdk.base.IBaseModel;
  6 +import com.share.mvpsdk.base.IBaseView;
  7 +import com.shunzhi.parent.bean.report.SceneDetialBean;
  8 +
  9 +import java.util.List;
  10 +
  11 +import io.reactivex.Observable;
  12 +
  13 +/**
  14 + * Created by Administrator on 2018/4/3 0003.
  15 + */
  16 +
  17 +public interface ReportSceneContract {
  18 + abstract class ReportScenePresenter extends BasePresenter<IReportSceneModel,IReportSceneView>{
  19 + public abstract void reportSceneResult(int sceneId,int screenId,String objectId,int schoolId,int objectType,String startDate,String endDate);
  20 + }
  21 + interface IReportSceneModel extends IBaseModel {
  22 + Observable<JsonObject> getReportSceneResult(int sceneId,int screenId,String objectId, int schoolId, int objectType,String startDate,String endDate);
  23 + }
  24 + interface IReportSceneView extends IBaseView {
  25 + void showSceneList(List<SceneDetialBean> list);
  26 + void showSceneInfo(String rank,String scoree,String pscoree,String sceneName);
  27 +
  28 + }
  29 +}
app/src/main/java/com/shunzhi/parent/manager/UpdateManager.java
@@ -148,7 +148,7 @@ public class UpdateManager { @@ -148,7 +148,7 @@ public class UpdateManager {
148 Timber.d("66666%s","currentVersion="+currentVersion+"serviceCode="+serviceCode+"versionCode="+versionCode); 148 Timber.d("66666%s","currentVersion="+currentVersion+"serviceCode="+serviceCode+"versionCode="+versionCode);
149 if ((serviceCode > versionCode) && ischeckingForUpdate && !isChechingInterrupted) { 149 if ((serviceCode > versionCode) && ischeckingForUpdate && !isChechingInterrupted) {
150 showNoticeDialog(currentVersion, version.content, isChechingInterrupted); 150 showNoticeDialog(currentVersion, version.content, isChechingInterrupted);
151 - } else if (!(serviceCode > versionCode) && shouldInterruptDialogShow && !isChechingInterrupted) { 151 + } else if (!(serviceCode > versionCode) && !isChechingInterrupted) {
152 Toast.makeText(mContext, "已经是最新版本啦!", Toast.LENGTH_SHORT).show(); 152 Toast.makeText(mContext, "已经是最新版本啦!", Toast.LENGTH_SHORT).show();
153 mContext = null; 153 mContext = null;
154 } 154 }
app/src/main/java/com/shunzhi/parent/model/report/ReportDetialModel.java 0 → 100644
@@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
  1 +package com.shunzhi.parent.model.report;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +import com.share.mvpsdk.helper.RetrofitCreateHelper;
  5 +import com.share.mvpsdk.helper.RxHelper;
  6 +import com.shunzhi.parent.AppConfig;
  7 +import com.shunzhi.parent.api.ReportApi;
  8 +import com.shunzhi.parent.contract.report.ReportDetialContract;
  9 +
  10 +import io.reactivex.Observable;
  11 +
  12 +/**
  13 + * Created by Administrator on 2018/4/8 0008.
  14 + */
  15 +
  16 +public class ReportDetialModel implements ReportDetialContract.IReportDetialModel {
  17 +
  18 + public static ReportDetialModel newInstance(){
  19 + return new ReportDetialModel();
  20 + }
  21 +
  22 + @Override
  23 + public Observable<JsonObject> getReportDetialResult(int screenId, int schoolId,String classId, int objectType, String startDate, String endDate) {
  24 + return RetrofitCreateHelper.getInstance().createApi(ReportApi.class, AppConfig.BASE_URL).getReportDetial(screenId,schoolId,objectType,classId,startDate,endDate).compose(RxHelper.<JsonObject>rxSchedulerHelper());
  25 + }
  26 +}
app/src/main/java/com/shunzhi/parent/model/report/ReportModel.java
@@ -18,9 +18,4 @@ public class ReportModel implements ReportContract.IReportModel { @@ -18,9 +18,4 @@ public class ReportModel implements ReportContract.IReportModel {
18 public Observable<ReportBean> getReportResult() { 18 public Observable<ReportBean> getReportResult() {
19 return null; 19 return null;
20 } 20 }
21 -  
22 - @Override  
23 - public void getReports() {  
24 -  
25 - }  
26 } 21 }
app/src/main/java/com/shunzhi/parent/model/report/ReportSceneModel.java 0 → 100644
@@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
  1 +package com.shunzhi.parent.model.report;
  2 +
  3 +import com.google.gson.JsonObject;
  4 +import com.share.mvpsdk.helper.RetrofitCreateHelper;
  5 +import com.share.mvpsdk.helper.RxHelper;
  6 +import com.shunzhi.parent.AppConfig;
  7 +import com.shunzhi.parent.api.ReportApi;
  8 +import com.shunzhi.parent.contract.report.ReportSceneContract;
  9 +
  10 +import io.reactivex.Observable;
  11 +
  12 +/**
  13 + * Created by Administrator on 2018/4/3 0003.
  14 + */
  15 +
  16 +public class ReportSceneModel implements ReportSceneContract.IReportSceneModel {
  17 +
  18 + public static ReportSceneModel newInstance() {
  19 + return new ReportSceneModel();
  20 + }
  21 + @Override
  22 + public Observable<JsonObject> getReportSceneResult(int sceneId,int screenId,String ObjectId, int schoolId, int objectType,String startDate,String endDate) {
  23 + return RetrofitCreateHelper.getInstance().createApi(ReportApi.class, AppConfig.BASE_URL)
  24 + .getSceneDetial(sceneId,screenId,ObjectId,schoolId,objectType,startDate,endDate).compose(RxHelper.<JsonObject>rxSchedulerHelper());
  25 + }
  26 +}
app/src/main/java/com/shunzhi/parent/popu/ShaiXuanPop.java
@@ -57,7 +57,7 @@ public class ShaiXuanPop extends PopupWindow { @@ -57,7 +57,7 @@ public class ShaiXuanPop extends PopupWindow {
57 tvSubmit.setOnClickListener(new View.OnClickListener() { 57 tvSubmit.setOnClickListener(new View.OnClickListener() {
58 @Override 58 @Override
59 public void onClick(View view) { 59 public void onClick(View view) {
60 - 60 + dismiss();
61 } 61 }
62 }); 62 });
63 63
app/src/main/java/com/shunzhi/parent/presenter/report/ReportDetialPresenter.java 0 → 100644
@@ -0,0 +1,69 @@ @@ -0,0 +1,69 @@
  1 +package com.shunzhi.parent.presenter.report;
  2 +
  3 +import com.google.gson.Gson;
  4 +import com.google.gson.JsonArray;
  5 +import com.google.gson.JsonObject;
  6 +import com.share.mvpsdk.utils.ToastUtils;
  7 +import com.shunzhi.parent.bean.report.DeyuDetialBean;
  8 +import com.shunzhi.parent.contract.report.ReportDetialContract;
  9 +import com.shunzhi.parent.model.report.ReportDetialModel;
  10 +
  11 +import java.util.ArrayList;
  12 +import java.util.Iterator;
  13 +import java.util.List;
  14 +
  15 +import io.reactivex.functions.Consumer;
  16 +
  17 +/**
  18 + * Created by Administrator on 2018/4/8 0008.
  19 + */
  20 +
  21 +public class ReportDetialPresenter extends ReportDetialContract.ReportDetialPresenter {
  22 + @Override
  23 + public ReportDetialContract.IReportDetialModel getModel() {
  24 + return ReportDetialModel.newInstance();
  25 + }
  26 +
  27 + @Override
  28 + public void onStart() {
  29 +
  30 + }
  31 +
  32 + @Override
  33 + public void reportDetialResult(int screenId, int schoolId, String classId, int objectType, String startDate, String endDate) {
  34 + mRxManager.register(mIModel.getReportDetialResult(screenId, schoolId, classId, objectType, startDate, endDate).subscribe(new Consumer<JsonObject>() {
  35 + @Override
  36 + public void accept(JsonObject jsonObject) throws Exception {
  37 +
  38 + ToastUtils.showToast(jsonObject.toString());
  39 + JsonObject data = jsonObject.getAsJsonObject("data");
  40 + String risePoint = data.get("risePoint").getAsString();
  41 + String pointUpAverage = data.get("pointUpAverage").getAsString();
  42 + float ranking = data.get("ranking").getAsFloat();
  43 + String riseRanking = data.get("riseRanking").getAsString();
  44 + String averageRanking = data.get("averageRanking").getAsString();
  45 + String evaluationDescripe = data.get("evaluationDescripe").getAsString();
  46 + String pscore = String.format("%.1f", data.get("pscore").getAsFloat());
  47 +
  48 + JsonArray reportDetialArray = data.getAsJsonArray("sceneStatistics");
  49 + Gson g = new Gson();
  50 + List<DeyuDetialBean> list = new ArrayList<>();
  51 + Iterator it = reportDetialArray.iterator(); //Iterator处理
  52 + while (it.hasNext()) { //循环
  53 + DeyuDetialBean bean = g.fromJson(it.next().toString(), DeyuDetialBean.class); //String转化成JavaBean
  54 + list.add(bean); //加入list
  55 + }
  56 + mIView.showDetialList(list);
  57 + mIView.showDetialInfo(ranking, pscore, risePoint, pointUpAverage, riseRanking, averageRanking, evaluationDescripe);
  58 +
  59 +
  60 + }
  61 + }, new Consumer<Throwable>() {
  62 + @Override
  63 + public void accept(Throwable throwable) throws Exception {
  64 +
  65 + }
  66 + }));
  67 +
  68 + }
  69 +}
app/src/main/java/com/shunzhi/parent/presenter/report/ReportScenePresenter.java 0 → 100644
@@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
  1 +package com.shunzhi.parent.presenter.report;
  2 +
  3 +
  4 +import com.google.gson.Gson;
  5 +import com.google.gson.JsonArray;
  6 +import com.google.gson.JsonObject;
  7 +import com.share.mvpsdk.utils.ToastUtils;
  8 +import com.shunzhi.parent.bean.report.SceneDetialBean;
  9 +import com.shunzhi.parent.contract.report.ReportSceneContract;
  10 +import com.shunzhi.parent.model.report.ReportSceneModel;
  11 +
  12 +import java.util.ArrayList;
  13 +import java.util.Iterator;
  14 +import java.util.List;
  15 +
  16 +import io.reactivex.functions.Consumer;
  17 +
  18 +/**
  19 + * Created by Administrator on 2018/4/3 0003.
  20 + */
  21 +
  22 +public class ReportScenePresenter extends ReportSceneContract.ReportScenePresenter {
  23 + @Override
  24 + public ReportSceneContract.IReportSceneModel getModel() {
  25 + return ReportSceneModel.newInstance();
  26 + }
  27 +
  28 + @Override
  29 + public void onStart() {
  30 +
  31 + }
  32 +
  33 + @Override
  34 + public void reportSceneResult(int sceneId,int screenId,String objectId, int schoolId, int objectType,String startDate,String endDate) {
  35 + mRxManager.register(mIModel.getReportSceneResult(sceneId,screenId,objectId, schoolId, objectType,startDate,endDate).subscribe(new Consumer<JsonObject>() {
  36 + @Override
  37 + public void accept(JsonObject jsonObject) throws Exception {
  38 + ToastUtils.showToast(jsonObject.toString());
  39 + JsonObject data = jsonObject.getAsJsonObject("data");
  40 + JsonArray behaviorArray = data.getAsJsonArray("behavior");
  41 + String rank = data.get("rank").getAsString();
  42 + String scoree = data.get("scoree").getAsString();
  43 + String pscoree = data.get("pscoree").getAsString();
  44 + String sceneName = data.get("sceneName").getAsString();
  45 + Gson g = new Gson();
  46 + List<SceneDetialBean> list = new ArrayList<>();
  47 + Iterator it = behaviorArray.iterator(); //Iterator处理
  48 + while (it.hasNext()) { //循环
  49 + SceneDetialBean bean = g.fromJson(it.next().toString(), SceneDetialBean.class); //String转化成JavaBean
  50 + list.add(bean); //加入list
  51 + }
  52 + mIView.showSceneList(list);
  53 + mIView.showSceneInfo(rank,scoree,pscoree,sceneName);
  54 + }
  55 + }, new Consumer<Throwable>() {
  56 + @Override
  57 + public void accept(Throwable throwable) throws Exception {
  58 +
  59 + }
  60 + }));
  61 +
  62 + }
  63 +}
app/src/main/java/com/shunzhi/parent/ui/MainActivity.java
@@ -26,7 +26,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. @@ -26,7 +26,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils.
26 26
27 BottomNavigationView bottom_navigationView; 27 BottomNavigationView bottom_navigationView;
28 28
29 - CePingFragment cePingFragment = null; 29 +// CePingFragment cePingFragment = null;
30 30
31 ConsultFragment consultFragment = null; 31 ConsultFragment consultFragment = null;
32 32
@@ -36,7 +36,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. @@ -36,7 +36,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils.
36 36
37 Fragment[] fragments = null; 37 Fragment[] fragments = null;
38 38
39 - private int CEPING_INDEX = 0, CONSULT_INDEX = 1, REPORT_INDEX = 2, MINE_INDEX = 3; 39 + private int CEPING_INDEX = 0, CONSULT_INDEX = 0, REPORT_INDEX = 1, MINE_INDEX = 2;
40 40
41 FragmentTransaction fragmentTransaction = null; 41 FragmentTransaction fragmentTransaction = null;
42 42
@@ -54,10 +54,11 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. @@ -54,10 +54,11 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils.
54 @Override 54 @Override
55 public boolean onNavigationItemSelected(@NonNull MenuItem item) { 55 public boolean onNavigationItemSelected(@NonNull MenuItem item) {
56 switch (item.getItemId()) { 56 switch (item.getItemId()) {
57 - case R.id.menu_item_index://测评页面  
58 - showFragment(CEPING_INDEX);  
59 - break; 57 +// case R.id.menu_item_index://测评页面
  58 +// showFragment(CEPING_INDEX);
  59 +// break;
60 case R.id.menu_item_consult://咨询频道 60 case R.id.menu_item_consult://咨询频道
  61 +// showFragment(CONSULT_INDEX);
61 showFragment(CONSULT_INDEX); 62 showFragment(CONSULT_INDEX);
62 break; 63 break;
63 case R.id.menu_item_report://报告 64 case R.id.menu_item_report://报告
@@ -75,23 +76,24 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. @@ -75,23 +76,24 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils.
75 } 76 }
76 77
77 private void initFragments() { 78 private void initFragments() {
78 - fragments = new Fragment[4];  
79 - cePingFragment = new CePingFragment(); 79 + fragments = new Fragment[3];
  80 +// cePingFragment = new CePingFragment();
80 consultFragment = new ConsultFragment(); 81 consultFragment = new ConsultFragment();
81 reportFragment = new ReportFragment(); 82 reportFragment = new ReportFragment();
82 mineFragment = new MineFragment(); 83 mineFragment = new MineFragment();
83 - fragments[CEPING_INDEX] = cePingFragment; 84 +// fragments[CEPING_INDEX] = cePingFragment;
84 fragments[CONSULT_INDEX] = consultFragment; 85 fragments[CONSULT_INDEX] = consultFragment;
85 fragments[REPORT_INDEX] = reportFragment; 86 fragments[REPORT_INDEX] = reportFragment;
86 fragments[MINE_INDEX] = mineFragment; 87 fragments[MINE_INDEX] = mineFragment;
87 88
88 fragmentTransaction = getSupportFragmentManager().beginTransaction(); 89 fragmentTransaction = getSupportFragmentManager().beginTransaction();
89 - fragmentTransaction.add(R.id.frame, cePingFragment) 90 + fragmentTransaction
  91 +// .add(R.id.frame, cePingFragment)
90 .add(R.id.frame, consultFragment) 92 .add(R.id.frame, consultFragment)
91 .add(R.id.frame, reportFragment) 93 .add(R.id.frame, reportFragment)
92 .add(R.id.frame, mineFragment) 94 .add(R.id.frame, mineFragment)
93 - .show(cePingFragment)  
94 - .hide(consultFragment) 95 +// .show(cePingFragment)
  96 + .show(consultFragment)
95 .hide(reportFragment) 97 .hide(reportFragment)
96 .hide(mineFragment) 98 .hide(mineFragment)
97 .commit(); 99 .commit();
@@ -103,8 +105,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. @@ -103,8 +105,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils.
103 if (index == i) fragmentTransaction.show(fragments[index]); 105 if (index == i) fragmentTransaction.show(fragments[index]);
104 else fragmentTransaction.hide(fragments[i]); 106 else fragmentTransaction.hide(fragments[i]);
105 } 107 }
106 - if (index==CONSULT_INDEX)consultFragment.refresh();  
107 - else if (index==CEPING_INDEX)cePingFragment.refresh(); 108 + if (index == CONSULT_INDEX) consultFragment.refresh();
  109 +// else if (index == CEPING_INDEX) cePingFragment.refresh();
108 fragmentTransaction.commit(); 110 fragmentTransaction.commit();
109 } 111 }
110 112
app/src/main/java/com/shunzhi/parent/ui/activity/report/ReportSceneActivity.java
@@ -20,8 +20,9 @@ import com.shunzhi.parent.ui.fragment.report.ReportSceneFragment; @@ -20,8 +20,9 @@ import com.shunzhi.parent.ui.fragment.report.ReportSceneFragment;
20 */ 20 */
21 21
22 public class ReportSceneActivity extends BaseMVPCompatActivity implements View.OnClickListener { 22 public class ReportSceneActivity extends BaseMVPCompatActivity implements View.OnClickListener {
23 - public static void getInstance(Context context) { 23 + public static void getInstance(Context context,int screenID) {
24 Intent intent = new Intent(context, ReportSceneActivity.class); 24 Intent intent = new Intent(context, ReportSceneActivity.class);
  25 + intent.putExtra("screenID",screenID);
25 context.startActivity(intent); 26 context.startActivity(intent);
26 } 27 }
27 28
@@ -53,7 +54,10 @@ public class ReportSceneActivity extends BaseMVPCompatActivity implements View.O @@ -53,7 +54,10 @@ public class ReportSceneActivity extends BaseMVPCompatActivity implements View.O
53 center_title = findViewById(R.id.center_title); 54 center_title = findViewById(R.id.center_title);
54 center_title.setText("场景详情"); 55 center_title.setText("场景详情");
55 ivBack.setOnClickListener(this); 56 ivBack.setOnClickListener(this);
56 - 57 + int screenID = getIntent().getIntExtra("screenID",0);
  58 + Bundle bundle=new Bundle();
  59 + bundle.putInt("screenID",screenID);
  60 + reportSceneFragment.setArguments(bundle);
57 fragmentTransaction = getSupportFragmentManager().beginTransaction(); 61 fragmentTransaction = getSupportFragmentManager().beginTransaction();
58 fragmentTransaction.add(R.id.frame_scene, reportSceneFragment) 62 fragmentTransaction.add(R.id.frame_scene, reportSceneFragment)
59 .show(reportSceneFragment).commit(); 63 .show(reportSceneFragment).commit();
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
@@ -41,6 +41,7 @@ import java.util.List; @@ -41,6 +41,7 @@ import java.util.List;
41 import cn.jzvd.JZVideoPlayerStandard; 41 import cn.jzvd.JZVideoPlayerStandard;
42 import me.leefeng.citypicker.CityPicker; 42 import me.leefeng.citypicker.CityPicker;
43 import me.leefeng.citypicker.CityPickerListener; 43 import me.leefeng.citypicker.CityPickerListener;
  44 +import timber.log.Timber;
44 45
45 public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> implements View.OnClickListener 46 public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> implements View.OnClickListener
46 , ConsultContract.IConsultView, CityPickerListener { 47 , ConsultContract.IConsultView, CityPickerListener {
@@ -54,6 +55,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -54,6 +55,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
54 MyConsultAdapter contextAdapter; 55 MyConsultAdapter contextAdapter;
55 56
56 List<String> imgesUrl = new ArrayList<>(); 57 List<String> imgesUrl = new ArrayList<>();
  58 + List<String> imgWebUrl=new ArrayList<>();//跳转的连接
57 List<String> describeList = new ArrayList<>(); 59 List<String> describeList = new ArrayList<>();
58 List<GuangGaoBean> guanggaoList = new ArrayList<>(); 60 List<GuangGaoBean> guanggaoList = new ArrayList<>();
59 List<ChannelContextBean> contextList = new ArrayList<>(); 61 List<ChannelContextBean> contextList = new ArrayList<>();
@@ -148,7 +150,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -148,7 +150,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
148 xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() { 150 xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() {
149 @Override 151 @Override
150 public void onItemClick(XBanner banner, int position) { 152 public void onItemClick(XBanner banner, int position) {
151 - WebViewActivity.getInstance(getContext(), imgesUrl.get(position), -1); 153 + WebViewActivity.getInstance(getContext(), imgWebUrl.get(position), -1);
152 } 154 }
153 }); 155 });
154 } 156 }
@@ -234,6 +236,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu @@ -234,6 +236,7 @@ public class ConsultFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consu
234 for (int i = 0; i < guangGaoBeanList.size(); i++) { 236 for (int i = 0; i < guangGaoBeanList.size(); i++) {
235 imgesUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); 237 imgesUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc);
236 describeList.add(guangGaoBeanList.get(i).describe); 238 describeList.add(guangGaoBeanList.get(i).describe);
  239 + imgWebUrl.add(guangGaoBeanList.get(i).url);
237 } 240 }
238 initBanners(); 241 initBanners();
239 } 242 }
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -175,7 +175,7 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract @@ -175,7 +175,7 @@ public class MineFragment extends BaseMVPCompatFragment&lt;LoginAndRegisterContract
175 175
176 break; 176 break;
177 case R.id.layout_update: 177 case R.id.layout_update:
178 - UpdateManager.getInstance().setContext(getContext()).isUpdate(true); 178 + UpdateManager.getInstance().setContext(getContext()).isUpdate(false);
179 break; 179 break;
180 default: 180 default:
181 break; 181 break;
app/src/main/java/com/shunzhi/parent/ui/fragment/ReportFragment.java
@@ -2,8 +2,15 @@ package com.shunzhi.parent.ui.fragment; @@ -2,8 +2,15 @@ package com.shunzhi.parent.ui.fragment;
2 2
3 3
4 import android.os.Bundle; 4 import android.os.Bundle;
  5 +import android.os.Handler;
  6 +import android.os.Message;
5 import android.support.annotation.NonNull; 7 import android.support.annotation.NonNull;
6 import android.support.annotation.Nullable; 8 import android.support.annotation.Nullable;
  9 +import android.support.design.widget.TabLayout;
  10 +import android.support.v4.app.Fragment;
  11 +import android.support.v4.app.FragmentManager;
  12 +import android.support.v4.app.FragmentPagerAdapter;
  13 +import android.support.v4.view.ViewPager;
7 import android.support.v7.widget.LinearLayoutManager; 14 import android.support.v7.widget.LinearLayoutManager;
8 import android.support.v7.widget.RecyclerView; 15 import android.support.v7.widget.RecyclerView;
9 import android.view.View; 16 import android.view.View;
@@ -13,39 +20,33 @@ import com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView; @@ -13,39 +20,33 @@ import com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView;
13 import com.prolificinteractive.materialcalendarview.CalendarDay; 20 import com.prolificinteractive.materialcalendarview.CalendarDay;
14 import com.prolificinteractive.materialcalendarview.MaterialCalendarView; 21 import com.prolificinteractive.materialcalendarview.MaterialCalendarView;
15 import com.share.mvpsdk.base.BasePresenter; 22 import com.share.mvpsdk.base.BasePresenter;
  23 +import com.share.mvpsdk.base.fragment.BaseCompatFragment;
16 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 24 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
  25 +import com.share.mvpsdk.utils.ToastUtils;
17 import com.shunzhi.parent.R; 26 import com.shunzhi.parent.R;
18 import com.shunzhi.parent.adapter.ReportAdapter; 27 import com.shunzhi.parent.adapter.ReportAdapter;
19 import com.shunzhi.parent.bean.ReportBean; 28 import com.shunzhi.parent.bean.ReportBean;
20 import com.shunzhi.parent.contract.report.ReportContract; 29 import com.shunzhi.parent.contract.report.ReportContract;
21 import com.shunzhi.parent.popu.ShaiXuanPop; 30 import com.shunzhi.parent.popu.ShaiXuanPop;
22 import com.shunzhi.parent.presenter.report.ReportPresenter; 31 import com.shunzhi.parent.presenter.report.ReportPresenter;
  32 +import com.shunzhi.parent.ui.fragment.report.ChengZhangFragment;
23 import com.shunzhi.parent.views.CustomLinearLayoutManager; 33 import com.shunzhi.parent.views.CustomLinearLayoutManager;
24 34
25 import java.util.List; 35 import java.util.List;
26 36
27 -public class ReportFragment extends BaseMVPCompatFragment<ReportContract.ReportPresenter, ReportContract.IReportModel>  
28 - implements ReportContract.IReportView ,View.OnClickListener{ 37 +public class ReportFragment extends BaseCompatFragment implements View.OnClickListener {
  38 + ViewPager viewPager;
29 39
30 - RecyclerView recyclerView;  
31 - ReportAdapter reportAdapter; 40 + TextView tvDate, tvShaiXuan, tvNoData;
32 41
33 - MonthWeekMaterialCalendarView monthWeekMaterialCalendarView = null; 42 + MyFragmentAdapter myFragmentAdapter = null;
34 43
35 - private CalendarDay selectedDate; 44 + TabLayout tabLayout;
36 45
37 - MaterialCalendarView calendarView_month_mode;  
38 -  
39 - TextView tvDate,tvShaiXuan,tvNoData; 46 + ChengZhangFragment chengZhangFragment1 = null, chengZhangFragment2 = null;//成长、报告页面
40 47
41 ShaiXuanPop shaiXuanPop=null; 48 ShaiXuanPop shaiXuanPop=null;
42 49
43 - @NonNull  
44 - @Override  
45 - public BasePresenter initPresenter() {  
46 - return new ReportPresenter();  
47 - }  
48 -  
49 @Override 50 @Override
50 public int getLayoutId() { 51 public int getLayoutId() {
51 return R.layout.fragment_report; 52 return R.layout.fragment_report;
@@ -53,84 +54,88 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP @@ -53,84 +54,88 @@ public class ReportFragment extends BaseMVPCompatFragment&lt;ReportContract.ReportP
53 54
54 @Override 55 @Override
55 public void initUI(View view, @Nullable Bundle savedInstanceState) { 56 public void initUI(View view, @Nullable Bundle savedInstanceState) {
56 - recyclerView = view.findViewById(R.id.recycle_report);  
57 - calendarView_month_mode = view.findViewById(R.id.calendarView_month_mode); 57 + viewPager = view.findViewById(R.id.viewPager);
58 tvDate = view.findViewById(R.id.tvDate); 58 tvDate = view.findViewById(R.id.tvDate);
59 - tvShaiXuan=view.findViewById(R.id.tvShaiXuan);  
60 - tvNoData=view.findViewById(R.id.tvNoData);  
61 -  
62 - LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());  
63 - layoutManager.setOrientation(LinearLayoutManager.VERTICAL);  
64 - recyclerView.setLayoutManager(new CustomLinearLayoutManager(getActivity(),  
65 - LinearLayoutManager.VERTICAL, false));  
66 - recyclerView.setHasFixedSize(true);  
67 - monthWeekMaterialCalendarView = view.findViewById(R.id.slidelayout);  
68 - initCalendarView();  
69 - initReportList(); 59 + tvShaiXuan = view.findViewById(R.id.tvShaiXuan);
  60 + tvNoData = view.findViewById(R.id.tvNoData);
  61 + tabLayout = view.findViewById(R.id.tabLayout);
70 62
71 - } 63 + tvShaiXuan.setOnClickListener(this);
72 64
73 - private void initCalendarView() { 65 + myFragmentAdapter = new MyFragmentAdapter(getChildFragmentManager());
74 66
75 - selectedDate = CalendarDay.today();  
76 - showDate();  
77 - monthWeekMaterialCalendarView.setMode(MonthWeekMaterialCalendarView.Mode.WEEK);  
78 - monthWeekMaterialCalendarView.setCurrentDate(selectedDate);  
79 - monthWeekMaterialCalendarView.setSelectedDate(selectedDate);  
80 - monthWeekMaterialCalendarView.state().edit().setSlideModeChangeListener(new MonthWeekMaterialCalendarView.SlideModeChangeListener() { 67 + viewPager.setAdapter(myFragmentAdapter);
  68 + tabLayout.setupWithViewPager(viewPager);
  69 + tabLayout.removeAllTabs();
  70 + tabLayout.addTab(tabLayout.newTab().setText("成长"));
  71 + tabLayout.addTab(tabLayout.newTab().setText("报告"));
  72 + viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
81 @Override 73 @Override
82 - public void modeChange(MonthWeekMaterialCalendarView.Mode mode) { 74 + public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
83 75
84 } 76 }
85 - }).setSlideDateSelectedlistener(new MonthWeekMaterialCalendarView.SlideDateSelectedlistener() {  
86 - @Override  
87 - public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay date, boolean selected) {  
88 - selectedDate = date;  
89 - showDate();  
90 77
91 - }  
92 - }).setSlideOnMonthChangedListener(new MonthWeekMaterialCalendarView.SlideOnMonthChangedListener() {  
93 @Override 78 @Override
94 - public void onMonthChanged(MaterialCalendarView widget, CalendarDay date) {  
95 - selectedDate = date;  
96 - showDate(); 79 + public void onPageSelected(int position) {
  80 + if (position==0)tvShaiXuan.setVisibility(View.GONE);
  81 + else tvShaiXuan.setVisibility(View.VISIBLE);
97 } 82 }
98 - }).commit();  
99 83
100 - } 84 + @Override
  85 + public void onPageScrollStateChanged(int state) {
101 86
102 - private void showDate() {  
103 -// tvDate.setText(selectedDate.getYear() + "年" + (selectedDate.getMonth() + 1) + "月");  
104 - } 87 + }
  88 + });
105 89
106 - private void initReportList() {  
107 - mPresenter.reportResult();  
108 - tvShaiXuan.setOnClickListener(this);  
109 } 90 }
110 91
111 @Override 92 @Override
112 - public void UpdateList(List<ReportBean> list) {  
113 - reportAdapter = new ReportAdapter(getActivity());  
114 - reportAdapter.addAll(list);  
115 - recyclerView.setAdapter(reportAdapter); 93 + public void onClick(View view) {
  94 + switch (view.getId()){
  95 + case R.id.tvShaiXuan:
  96 + if (null == shaiXuanPop) shaiXuanPop = new ShaiXuanPop(getActivity());
  97 + chengZhangFragment2.showShaixuan(handler);
  98 + break;
  99 + }
116 } 100 }
117 101
118 - @Override  
119 - public void showReports(List<String> stringList) {  
120 - if (null!=shaiXuanPop){  
121 - if (stringList.size()>0)tvNoData.setVisibility(View.GONE);  
122 - shaiXuanPop.setDatas(stringList); 102 + Handler handler=new Handler(){
  103 + @Override
  104 + public void handleMessage(Message msg) {
  105 + super.handleMessage(msg);
  106 + shaiXuanPop.setDatas((List<String>) msg.obj);
123 shaiXuanPop.show(tvShaiXuan); 107 shaiXuanPop.show(tvShaiXuan);
124 } 108 }
125 - } 109 + };
126 110
127 @Override 111 @Override
128 - public void onClick(View view) {  
129 - switch (view.getId()){  
130 - case R.id.tvShaiXuan:  
131 - if (null==shaiXuanPop)shaiXuanPop=new ShaiXuanPop(getActivity());  
132 - mPresenter.getReports();  
133 - break; 112 + public void onDestroy() {
  113 + super.onDestroy();
  114 + if (handler!=null)handler=null;
  115 + }
  116 +
  117 + private class MyFragmentAdapter extends FragmentPagerAdapter {
  118 +
  119 + public MyFragmentAdapter(FragmentManager fm) {
  120 + super(fm);
  121 + }
  122 +
  123 + @Override
  124 + public Fragment getItem(int position) {
  125 + if (position == 0) {
  126 + chengZhangFragment1 = ChengZhangFragment.newInstance(ChengZhangFragment.TYPE_CHENGZHANG);
  127 + return chengZhangFragment1;
  128 + } else if (position == 1) {
  129 + chengZhangFragment2 = ChengZhangFragment.newInstance(ChengZhangFragment.TYPE_REPORT);
  130 + return chengZhangFragment2;
  131 + }
  132 + return null;
  133 + }
  134 +
  135 + @Override
  136 + public int getCount() {
  137 + return 2;
134 } 138 }
135 } 139 }
  140 +
136 } 141 }
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
1 package com.shunzhi.parent.ui.fragment; 1 package com.shunzhi.parent.ui.fragment;
2 2
  3 +import android.media.MediaMetadataRetriever;
3 import android.os.Bundle; 4 import android.os.Bundle;
4 import android.os.CountDownTimer; 5 import android.os.CountDownTimer;
5 import android.support.annotation.NonNull; 6 import android.support.annotation.NonNull;
@@ -12,6 +13,7 @@ import android.widget.TextView; @@ -12,6 +13,7 @@ import android.widget.TextView;
12 13
13 import com.share.mvpsdk.base.BasePresenter; 14 import com.share.mvpsdk.base.BasePresenter;
14 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 15 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
  16 +import com.share.mvpsdk.view.MyVieoView;
15 import com.shunzhi.parent.AppConfig; 17 import com.shunzhi.parent.AppConfig;
16 import com.shunzhi.parent.R; 18 import com.shunzhi.parent.R;
17 import com.shunzhi.parent.bean.GuangGaoBean; 19 import com.shunzhi.parent.bean.GuangGaoBean;
@@ -28,6 +30,7 @@ import java.util.ArrayList; @@ -28,6 +30,7 @@ import java.util.ArrayList;
28 import java.util.List; 30 import java.util.List;
29 31
30 import cn.jzvd.JZVideoPlayerStandard; 32 import cn.jzvd.JZVideoPlayerStandard;
  33 +import timber.log.Timber;
31 34
32 public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> 35 public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel>
33 implements ConsultContract.IConsultView { 36 implements ConsultContract.IConsultView {
@@ -38,13 +41,15 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -38,13 +41,15 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
38 41
39 boolean isQidong = false; 42 boolean isQidong = false;
40 43
41 - JZVideoPlayerStandard jiecaoVideo; 44 +// JZVideoPlayerStandard jiecaoVideo;
42 45
  46 + MyVieoView myVideoView = null;
43 47
44 - CountDownTimer countDownTimer=new CountDownTimer(5*1000,1000) { 48 +
  49 + CountDownTimer countDownTimer = new CountDownTimer(5 * 1000, 1000) {
45 @Override 50 @Override
46 public void onTick(long l) { 51 public void onTick(long l) {
47 - tvJump.setText("跳转"+l/1000+"s"); 52 + tvJump.setText("跳转" + l / 1000 + "s");
48 } 53 }
49 54
50 @Override 55 @Override
@@ -64,21 +69,13 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -64,21 +69,13 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
64 69
65 xBanner = view.findViewById(R.id.xBanner); 70 xBanner = view.findViewById(R.id.xBanner);
66 tvJump = view.findViewById(R.id.tvJump); 71 tvJump = view.findViewById(R.id.tvJump);
67 - jiecaoVideo = view.findViewById(R.id.jiecaoVideo);  
68 - jiecaoVideo.tinyBackImageView.setVisibility(View.GONE);  
69 - jiecaoVideo.backButton.setVisibility(View.GONE);  
70 - jiecaoVideo.replayTextView.setVisibility(View.GONE);  
71 - jiecaoVideo.batteryLevel.setVisibility(View.GONE);  
72 - jiecaoVideo.thumbImageView.setVisibility(View.GONE);  
73 - jiecaoVideo.loadingProgressBar.setVisibility(View.GONE);  
74 - countDownTimer.start(); 72 + myVideoView = view.findViewById(R.id.myVideoView);
75 isQidong = TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START)); 73 isQidong = TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START));
76 -  
77 - if (isQidong)mPresenter.getBanners("0", ""); 74 + if (isQidong) mPresenter.getBanners("0", "");
78 else mPresenter.getBanners("1", ""); 75 else mPresenter.getBanners("1", "");
79 showVideos(); 76 showVideos();
80 77
81 - tvJump=view.findViewById(R.id.tvJump); 78 + tvJump = view.findViewById(R.id.tvJump);
82 79
83 tvJump.setOnClickListener(new View.OnClickListener() { 80 tvJump.setOnClickListener(new View.OnClickListener() {
84 @Override 81 @Override
@@ -90,17 +87,12 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -90,17 +87,12 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
90 87
91 } 88 }
92 89
93 - private void showVideos(){ 90 + private void showVideos() {
94 if (isQidong) { 91 if (isQidong) {
95 - jiecaoVideo.setVisibility(View.VISIBLE);  
96 xBanner.setVisibility(View.GONE); 92 xBanner.setVisibility(View.GONE);
97 -// mPresenter.getBanners("0", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district);  
98 mPresenter.getBanners("0", ""); 93 mPresenter.getBanners("0", "");
99 } else { 94 } else {
100 - jiecaoVideo.setVisibility(View.GONE);  
101 xBanner.setVisibility(View.VISIBLE); 95 xBanner.setVisibility(View.VISIBLE);
102 -// mPresenter.getBanners("1", "");  
103 -// mPresenter.getBanners("1", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district);  
104 } 96 }
105 } 97 }
106 98
@@ -129,12 +121,15 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -129,12 +121,15 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
129 public void showContext(List<ChannelContextBean> list) { 121 public void showContext(List<ChannelContextBean> list) {
130 122
131 } 123 }
132 - List<String> imgUrl = new ArrayList<>(); 124 +
  125 + List<String> imgUrl = new ArrayList<>();
133 List<String> describeList = new ArrayList<>(); 126 List<String> describeList = new ArrayList<>();
  127 +
134 private void initBannes(List<GuangGaoBean> guangGaoBeanList) { 128 private void initBannes(List<GuangGaoBean> guangGaoBeanList) {
135 try { 129 try {
136 imgUrl = new ArrayList<>(); 130 imgUrl = new ArrayList<>();
137 describeList = new ArrayList<>(); 131 describeList = new ArrayList<>();
  132 +// Timber.d("66666%s","guangGaoBeanList="+guangGaoBeanList);
138 if (isQidong) { 133 if (isQidong) {
139 AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1"); 134 AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1");
140 String fileUrl = "", describe = ""; 135 String fileUrl = "", describe = "";
@@ -144,16 +139,17 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -144,16 +139,17 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
144 describe = guangGaoBeanList.get(i).describe; 139 describe = guangGaoBeanList.get(i).describe;
145 imgUrl.add(fileUrl); 140 imgUrl.add(fileUrl);
146 describeList.add(describe); 141 describeList.add(describe);
147 - }else { 142 + } else {
148 imgUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); 143 imgUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc);
149 describeList.add(guangGaoBeanList.get(i).describe); 144 describeList.add(guangGaoBeanList.get(i).describe);
150 } 145 }
151 } 146 }
152 - if (!TextUtils.isEmpty(fileUrl)){  
153 - jiecaoVideo.setUp(fileUrl, JZVideoPlayerStandard.SCREEN_WINDOW_NORMAL, describe);  
154 - jiecaoVideo.startVideo();  
155 - }else {  
156 - isQidong=false; 147 + if (!TextUtils.isEmpty(fileUrl)) {
  148 + myVideoView.setVideoPath(fileUrl);
  149 + myVideoView.start();
  150 + myVideoView.requestFocus();
  151 + } else {
  152 + isQidong = false;
157 startNewActivity(StartActivity.class); 153 startNewActivity(StartActivity.class);
158 // showVideos(); 154 // showVideos();
159 // showBanners(); 155 // showBanners();
@@ -166,13 +162,14 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -166,13 +162,14 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
166 } 162 }
167 showBanners(); 163 showBanners();
168 } 164 }
169 - 165 + countDownTimer.start();
170 } catch (Exception e) { 166 } catch (Exception e) {
171 e.printStackTrace(); 167 e.printStackTrace();
  168 + countDownTimer.start();
172 } 169 }
173 } 170 }
174 171
175 - private void showBanners(){ 172 + private void showBanners() {
176 xBanner.setData(imgUrl, describeList); 173 xBanner.setData(imgUrl, describeList);
177 xBanner.stopAutoPlay(); 174 xBanner.stopAutoPlay();
178 xBanner.setmAutoPalyTime(10000); 175 xBanner.setmAutoPalyTime(10000);
@@ -188,6 +185,6 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult @@ -188,6 +185,6 @@ public class StartFragment extends BaseMVPCompatFragment&lt;ConsultContract.Consult
188 @Override 185 @Override
189 public void onDestroy() { 186 public void onDestroy() {
190 super.onDestroy(); 187 super.onDestroy();
191 - if (null!=countDownTimer)countDownTimer.cancel(); 188 + if (null != countDownTimer) countDownTimer.cancel();
192 } 189 }
193 } 190 }
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultOneLevelFragment.java
@@ -6,6 +6,7 @@ import android.support.annotation.Nullable; @@ -6,6 +6,7 @@ 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.text.TextUtils;
  9 +import android.util.Log;
9 import android.view.LayoutInflater; 10 import android.view.LayoutInflater;
10 import android.view.View; 11 import android.view.View;
11 import android.view.ViewGroup; 12 import android.view.ViewGroup;
@@ -130,7 +131,6 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -130,7 +131,6 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
130 } 131 }
131 132
132 private void initRecyclerView(List<GuangGaoBean> guangGaoBeanList) { 133 private void initRecyclerView(List<GuangGaoBean> guangGaoBeanList) {
133 -  
134 if (null == myGrallyAdapter) myGrallyAdapter = new MyGrallyAdapter(); 134 if (null == myGrallyAdapter) myGrallyAdapter = new MyGrallyAdapter();
135 myGrallyAdapter.addAll(guangGaoBeanList); 135 myGrallyAdapter.addAll(guangGaoBeanList);
136 recyclerViewGrally.setAdapter(myGrallyAdapter); 136 recyclerViewGrally.setAdapter(myGrallyAdapter);
@@ -150,7 +150,6 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -150,7 +150,6 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
150 150
151 @Override 151 @Override
152 public void showConsultContent(List<ChannelContextBean> list) { 152 public void showConsultContent(List<ChannelContextBean> list) {
153 -// Log.d("66666", "ChannelContextBean=" + list);  
154 if (null != list) { 153 if (null != list) {
155 myConsultBeanList.addAll(list); 154 myConsultBeanList.addAll(list);
156 if (myConsultAdapter == null) { 155 if (myConsultAdapter == null) {
@@ -216,8 +215,8 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon @@ -216,8 +215,8 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment&lt;ConsultOneCon
216 tv_grally_title = itemView.findViewById(R.id.tv_grally_title); 215 tv_grally_title = itemView.findViewById(R.id.tv_grally_title);
217 frame_root = itemView.findViewById(R.id.frame_root); 216 frame_root = itemView.findViewById(R.id.frame_root);
218 FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(-1, -1); 217 FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(-1, -1);
219 -// params.width = DisplayUtils.getScreenWidthPixels(getActivity()) - 100;  
220 -// params.setMargins(10, 0, 10, 0); 218 + params.width = DisplayUtils.getScreenWidthPixels(getActivity()) - 100;
  219 + params.setMargins(10, 0, 10, 0);
221 frame_root.setLayoutParams(params); 220 frame_root.setLayoutParams(params);
222 } 221 }
223 222
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ChengZhangFragment.java 0 → 100644
@@ -0,0 +1,172 @@ @@ -0,0 +1,172 @@
  1 +package com.shunzhi.parent.ui.fragment.report;
  2 +
  3 +import android.os.Bundle;
  4 +import android.os.Handler;
  5 +import android.os.Message;
  6 +import android.support.annotation.NonNull;
  7 +import android.support.annotation.Nullable;
  8 +import android.support.v7.widget.RecyclerView;
  9 +import android.view.View;
  10 +import android.widget.LinearLayout;
  11 +
  12 +import com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView;
  13 +import com.prolificinteractive.materialcalendarview.CalendarDay;
  14 +import com.prolificinteractive.materialcalendarview.MaterialCalendarView;
  15 +import com.share.mvpsdk.base.BasePresenter;
  16 +import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
  17 +import com.shunzhi.parent.R;
  18 +import com.shunzhi.parent.adapter.ReportAdapter;
  19 +import com.shunzhi.parent.bean.ReportBean;
  20 +import com.shunzhi.parent.contract.report.ReportContract;
  21 +import com.shunzhi.parent.popu.ShaiXuanPop;
  22 +import com.shunzhi.parent.presenter.report.ReportPresenter;
  23 +
  24 +import java.util.List;
  25 +
  26 +/**
  27 + */
  28 +public class ChengZhangFragment extends BaseMVPCompatFragment<ReportContract.ReportPresenter, ReportContract.IReportModel>
  29 + implements ReportContract.IReportView, View.OnClickListener {
  30 +
  31 + public static String TYPE_CHENGZHANG = "chengzhang", TYPE_REPORT = "report";
  32 +
  33 + public static ChengZhangFragment newInstance(String type) {
  34 + Bundle bundle = new Bundle();
  35 + bundle.putString("type", type);
  36 + ChengZhangFragment chengZhangFragment = new ChengZhangFragment();
  37 + chengZhangFragment.setArguments(bundle);
  38 + return chengZhangFragment;
  39 + }
  40 +
  41 + RecyclerView recyclerView;
  42 +
  43 + ReportAdapter reportAdapter;
  44 +
  45 + MonthWeekMaterialCalendarView monthWeekMaterialCalendarView = null;
  46 +
  47 + private CalendarDay selectedDate;
  48 +
  49 + MaterialCalendarView calendarView_month_mode;
  50 +
  51 + private String type = "";
  52 +
  53 + LinearLayout layout_chengzhang, layout_report, layout_kaoqin, layout_buka, layout_qingjia;
  54 +
  55 + @Override
  56 + public int getLayoutId() {
  57 + return R.layout.fragment_cheng_zhang;
  58 + }
  59 +
  60 + @Override
  61 + public void initUI(View view, @Nullable Bundle savedInstanceState) {
  62 +
  63 + layout_report = view.findViewById(R.id.layout_report);
  64 + recyclerView = view.findViewById(R.id.recycle_report);
  65 + layout_kaoqin = view.findViewById(R.id.layout_kaoqin);
  66 + layout_buka = view.findViewById(R.id.layout_buka);
  67 + layout_qingjia = view.findViewById(R.id.layout_qingjia);
  68 + calendarView_month_mode = view.findViewById(R.id.calendarView_month_mode);
  69 + monthWeekMaterialCalendarView = view.findViewById(R.id.slidelayout);
  70 + layout_chengzhang = view.findViewById(R.id.layout_chengzhang);
  71 +
  72 + layout_kaoqin.setOnClickListener(this);
  73 + layout_buka.setOnClickListener(this);
  74 + layout_qingjia.setOnClickListener(this);
  75 +
  76 + type = getArguments().getString("type");
  77 + if (type.equals(TYPE_CHENGZHANG)) {
  78 + layout_chengzhang.setVisibility(View.VISIBLE);
  79 + layout_report.setVisibility(View.GONE);
  80 +
  81 + } else {
  82 +
  83 + layout_chengzhang.setVisibility(View.GONE);
  84 + layout_report.setVisibility(View.VISIBLE);
  85 +
  86 + initCalendarView();
  87 + initReportList();
  88 +
  89 + }
  90 + }
  91 +
  92 + private void initCalendarView() {
  93 +
  94 + showDate();
  95 + selectedDate = CalendarDay.today();
  96 + monthWeekMaterialCalendarView.setMode(MonthWeekMaterialCalendarView.Mode.WEEK);
  97 + monthWeekMaterialCalendarView.setCurrentDate(selectedDate);
  98 + monthWeekMaterialCalendarView.setSelectedDate(selectedDate);
  99 + monthWeekMaterialCalendarView.state().edit().setSlideModeChangeListener(new MonthWeekMaterialCalendarView.SlideModeChangeListener() {
  100 + @Override
  101 + public void modeChange(MonthWeekMaterialCalendarView.Mode mode) {
  102 +
  103 + }
  104 + }).setSlideDateSelectedlistener(new MonthWeekMaterialCalendarView.SlideDateSelectedlistener() {
  105 + @Override
  106 + public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay date, boolean selected) {
  107 + selectedDate = date;
  108 + showDate();
  109 +
  110 + }
  111 + }).setSlideOnMonthChangedListener(new MonthWeekMaterialCalendarView.SlideOnMonthChangedListener() {
  112 + @Override
  113 + public void onMonthChanged(MaterialCalendarView widget, CalendarDay date) {
  114 + selectedDate = date;
  115 + showDate();
  116 + }
  117 + }).commit();
  118 +
  119 + }
  120 +
  121 + private void showDate() {
  122 +// tvDate.setText(selectedDate.getYear() + "年" + (selectedDate.getMonth() + 1) + "月");
  123 + }
  124 +
  125 + private void initReportList() {
  126 + mPresenter.reportResult();
  127 + }
  128 +
  129 + @Override
  130 + public void UpdateList(List<ReportBean> list) {
  131 + reportAdapter = new ReportAdapter(getActivity());
  132 + reportAdapter.addAll(list);
  133 + recyclerView.setAdapter(reportAdapter);
  134 + }
  135 +
  136 + @Override
  137 + public void showReports(List<String> stringList) {
  138 + if (null != handler) {
  139 + Message message = handler.obtainMessage();
  140 + message.obj = stringList;
  141 + handler.sendMessage(message);
  142 + }
  143 + }
  144 +
  145 + @Override
  146 + public void onClick(View view) {
  147 + switch (view.getId()) {
  148 + case R.id.layout_kaoqin:
  149 +
  150 + break;
  151 + case R.id.layout_buka:
  152 +
  153 + break;
  154 + case R.id.layout_qingjia:
  155 +
  156 + break;
  157 + }
  158 + }
  159 +
  160 + @NonNull
  161 + @Override
  162 + public BasePresenter initPresenter() {
  163 + return new ReportPresenter();
  164 + }
  165 +
  166 + Handler handler = null;
  167 +
  168 + public void showShaixuan(Handler handler) {
  169 + this.handler = handler;
  170 + mPresenter.getReports();
  171 + }
  172 +}
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ReportDetialFragment.java
@@ -6,17 +6,21 @@ import android.support.annotation.Nullable; @@ -6,17 +6,21 @@ 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.view.View; 8 import android.view.View;
  9 +import android.widget.TextView;
9 10
10 import com.share.mvpsdk.base.BasePresenter; 11 import com.share.mvpsdk.base.BasePresenter;
11 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 12 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
12 -import com.share.mvpsdk.utils.DateUtils;  
13 import com.share.mvpsdk.view.chartview.ChartView; 13 import com.share.mvpsdk.view.chartview.ChartView;
14 import com.share.mvpsdk.view.chartview.data.InputData; 14 import com.share.mvpsdk.view.chartview.data.InputData;
15 import com.shunzhi.parent.R; 15 import com.shunzhi.parent.R;
16 import com.shunzhi.parent.adapter.DeyuDetialAdapter; 16 import com.shunzhi.parent.adapter.DeyuDetialAdapter;
17 import com.shunzhi.parent.bean.report.DeyuDetialBean; 17 import com.shunzhi.parent.bean.report.DeyuDetialBean;
  18 +import com.shunzhi.parent.contract.report.ReportDetialContract;
  19 +import com.shunzhi.parent.presenter.report.ReportDetialPresenter;
18 20
  21 +import java.text.SimpleDateFormat;
19 import java.util.ArrayList; 22 import java.util.ArrayList;
  23 +import java.util.Calendar;
20 import java.util.Date; 24 import java.util.Date;
21 import java.util.List; 25 import java.util.List;
22 26
@@ -24,17 +28,24 @@ import java.util.List; @@ -24,17 +28,24 @@ import java.util.List;
24 * Created by Administrator on 2018/3/28 0028. 28 * Created by Administrator on 2018/3/28 0028.
25 */ 29 */
26 30
27 -public class ReportDetialFragment extends BaseMVPCompatFragment { 31 +public class ReportDetialFragment extends BaseMVPCompatFragment<ReportDetialContract.ReportDetialPresenter, ReportDetialContract.IReportDetialModel>
  32 + implements ReportDetialContract.IReportDetialView {
28 33
29 private RecyclerView recycle_deyu; 34 private RecyclerView recycle_deyu;
30 private DeyuDetialAdapter deyuDetialAdapter; 35 private DeyuDetialAdapter deyuDetialAdapter;
31 - List<DeyuDetialBean>list=new ArrayList<>(); 36 + List<DeyuDetialBean> deyulist = new ArrayList<>();
  37 +
  38 + private TextView tv_source, tv_bijiao1, tv_bijiao2, tv_bijiao3, tv_bijiao4, tv_date, tv_ranking, tv_describe;
  39 +
  40 +
  41 + private String startDate = "2018-04 -08", endDate = "2018-04-08";
32 42
33 private ChartView chartView; 43 private ChartView chartView;
  44 +
34 @NonNull 45 @NonNull
35 @Override 46 @Override
36 public BasePresenter initPresenter() { 47 public BasePresenter initPresenter() {
37 - return null; 48 + return new ReportDetialPresenter();
38 } 49 }
39 50
40 @Override 51 @Override
@@ -44,39 +55,69 @@ public class ReportDetialFragment extends BaseMVPCompatFragment { @@ -44,39 +55,69 @@ public class ReportDetialFragment extends BaseMVPCompatFragment {
44 55
45 @Override 56 @Override
46 public void initUI(View view, @Nullable Bundle savedInstanceState) { 57 public void initUI(View view, @Nullable Bundle savedInstanceState) {
47 - recycle_deyu=view.findViewById(R.id.recycle_deyu);  
48 - chartView=view.findViewById(R.id.chartView); 58 + recycle_deyu = view.findViewById(R.id.recycle_deyu);
  59 + chartView = view.findViewById(R.id.chartView);
  60 + tv_source = view.findViewById(R.id.tv_source);
  61 + tv_bijiao1 = view.findViewById(R.id.tv_bijiao1);
  62 + tv_bijiao2 = view.findViewById(R.id.tv_bijiao2);
  63 + tv_bijiao3 = view.findViewById(R.id.tv_bijiao3);
  64 + tv_bijiao4 = view.findViewById(R.id.tv_bijiao4);
  65 + tv_date = view.findViewById(R.id.tv_date);
  66 + tv_ranking = view.findViewById(R.id.tv_ranking);
  67 + tv_describe = view.findViewById(R.id.tv_describe);
  68 + Calendar c = Calendar.getInstance();
  69 + Date date = c.getTime();
  70 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  71 + String dateStr = sdf.format(date);
  72 + tv_date.setText(dateStr);
  73 +
49 recycle_deyu.setLayoutManager(new LinearLayoutManager(getActivity())); 74 recycle_deyu.setLayoutManager(new LinearLayoutManager(getActivity()));
50 - deyuDetialAdapter=new DeyuDetialAdapter(getActivity());  
51 - DeyuDetialBean deyuDetialBean=new DeyuDetialBean();  
52 - list.add(deyuDetialBean);  
53 - list.add(deyuDetialBean);  
54 - list.add(deyuDetialBean);  
55 - deyuDetialAdapter.addAll(list); 75 + deyuDetialAdapter = new DeyuDetialAdapter(getActivity());
56 recycle_deyu.setAdapter(deyuDetialAdapter); 76 recycle_deyu.setAdapter(deyuDetialAdapter);
57 -  
58 initChartViews(); 77 initChartViews();
  78 + mPresenter.reportDetialResult(0, 1, "70", 0, startDate, endDate);
59 79
60 } 80 }
61 81
62 private void initChartViews() { 82 private void initChartViews() {
63 83
64 - chartView.setColors(R.color.textColor,R.color.huodong_blue,R.color.gray);  
65 - List<InputData> inputDataList=new ArrayList<>();  
66 - List<InputData> inputDataList1=new ArrayList<>(); 84 + chartView.setColors(R.color.textColor, R.color.huodong_blue, R.color.gray);
  85 + List<InputData> inputDataList = new ArrayList<>();
  86 + List<InputData> inputDataList1 = new ArrayList<>();
67 for (int i = 0; i < 7; i++) { 87 for (int i = 0; i < 7; i++) {
68 - InputData inputData=new InputData("文明",10*i); 88 + InputData inputData = new InputData("文明", 10 * i);
69 inputDataList.add(inputData); 89 inputDataList.add(inputData);
70 } 90 }
71 91
72 chartView.setChartPaths(inputDataList); 92 chartView.setChartPaths(inputDataList);
73 93
74 for (int i = 0; i < 7; i++) { 94 for (int i = 0; i < 7; i++) {
75 - InputData inputData=new InputData("文明1",20*i); 95 + InputData inputData = new InputData("文明1", 20 * i);
76 inputDataList1.add(inputData); 96 inputDataList1.add(inputData);
77 } 97 }
78 98
79 chartView.setChartPaths(inputDataList1); 99 chartView.setChartPaths(inputDataList1);
80 100
81 } 101 }
  102 +
  103 + @Override
  104 + public void showDetialList(List<DeyuDetialBean> list) {
  105 + deyulist.clear();
  106 + deyulist.addAll(list);
  107 + deyuDetialAdapter.addAll(deyulist);
  108 + deyuDetialAdapter.notifyDataSetChanged();
  109 +
  110 +
  111 + }
  112 +
  113 + @Override
  114 + public void showDetialInfo(float rank, String scoree, String bijiao1, String bijiao2, String bijiao3, String bijiao4, String describe) {
  115 + tv_source.setText(scoree);
  116 + tv_bijiao1.setText(bijiao1);
  117 + tv_bijiao2.setText(bijiao2);
  118 + tv_bijiao3.setText(bijiao3);
  119 + tv_bijiao4.setText(bijiao4);
  120 + tv_ranking.setText(deyuDetialAdapter.getPaiming(rank));
  121 + tv_describe.setText(describe);
  122 + }
82 } 123 }
app/src/main/java/com/shunzhi/parent/ui/fragment/report/ReportSceneFragment.java
1 package com.shunzhi.parent.ui.fragment.report; 1 package com.shunzhi.parent.ui.fragment.report;
2 2
  3 +import android.annotation.SuppressLint;
3 import android.os.Bundle; 4 import android.os.Bundle;
4 import android.support.annotation.NonNull; 5 import android.support.annotation.NonNull;
5 import android.support.annotation.Nullable; 6 import android.support.annotation.Nullable;
6 import android.support.v7.widget.LinearLayoutManager; 7 import android.support.v7.widget.LinearLayoutManager;
7 import android.support.v7.widget.RecyclerView; 8 import android.support.v7.widget.RecyclerView;
8 import android.view.View; 9 import android.view.View;
  10 +import android.widget.TextView;
9 11
10 import com.share.mvpsdk.base.BasePresenter; 12 import com.share.mvpsdk.base.BasePresenter;
11 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; 13 import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment;
@@ -14,6 +16,8 @@ import com.share.mvpsdk.view.chartview.data.InputData; @@ -14,6 +16,8 @@ import com.share.mvpsdk.view.chartview.data.InputData;
14 import com.shunzhi.parent.R; 16 import com.shunzhi.parent.R;
15 import com.shunzhi.parent.adapter.ReportSceneAdapter; 17 import com.shunzhi.parent.adapter.ReportSceneAdapter;
16 import com.shunzhi.parent.bean.report.SceneDetialBean; 18 import com.shunzhi.parent.bean.report.SceneDetialBean;
  19 +import com.shunzhi.parent.contract.report.ReportSceneContract;
  20 +import com.shunzhi.parent.presenter.report.ReportScenePresenter;
17 21
18 import java.util.ArrayList; 22 import java.util.ArrayList;
19 import java.util.List; 23 import java.util.List;
@@ -22,17 +26,21 @@ import java.util.List; @@ -22,17 +26,21 @@ import java.util.List;
22 * Created by Administrator on 2018/3/28 0028. 26 * Created by Administrator on 2018/3/28 0028.
23 */ 27 */
24 28
25 -public class ReportSceneFragment extends BaseMVPCompatFragment { 29 +public class ReportSceneFragment extends BaseMVPCompatFragment<ReportSceneContract.ReportScenePresenter, ReportSceneContract.IReportSceneModel>
  30 + implements ReportSceneContract.IReportSceneView {
26 private RecyclerView recycle_scene; 31 private RecyclerView recycle_scene;
27 - private ReportSceneAdapter sceneDetialAdapter;  
28 - List<SceneDetialBean> list=new ArrayList<>();  
29 - 32 + private ReportSceneAdapter sceneDetialAdapter;
  33 + List<SceneDetialBean> scenenlist = new ArrayList<>();
  34 + private TextView tv_rank, tv_scoree, tv_pscoree,tv_sceneName;
30 35
31 private ChartView chartView; 36 private ChartView chartView;
  37 + String startData="2018-04-04",endData="2018-04-04",objectId="102697";
  38 + int schoolId=1,sceneId;
  39 +
32 @NonNull 40 @NonNull
33 @Override 41 @Override
34 public BasePresenter initPresenter() { 42 public BasePresenter initPresenter() {
35 - return null; 43 + return new ReportScenePresenter();
36 } 44 }
37 45
38 @Override 46 @Override
@@ -42,44 +50,43 @@ public class ReportSceneFragment extends BaseMVPCompatFragment { @@ -42,44 +50,43 @@ public class ReportSceneFragment extends BaseMVPCompatFragment {
42 50
43 @Override 51 @Override
44 public void initUI(View view, @Nullable Bundle savedInstanceState) { 52 public void initUI(View view, @Nullable Bundle savedInstanceState) {
45 - recycle_scene=view.findViewById(R.id.recycle_scene);  
46 - chartView=view.findViewById(R.id.chartView); 53 + recycle_scene = view.findViewById(R.id.recycle_scene);
  54 + chartView = view.findViewById(R.id.chartView);
  55 + tv_rank = view.findViewById(R.id.rank);
  56 + tv_scoree = view.findViewById(R.id.scoree);
  57 + tv_pscoree = view.findViewById(R.id.pscoree);
  58 + tv_sceneName = view.findViewById(R.id.sceneName);
  59 + sceneId=getArguments().getInt("sceneID",0);
47 recycle_scene.setLayoutManager(new LinearLayoutManager(getActivity())); 60 recycle_scene.setLayoutManager(new LinearLayoutManager(getActivity()));
48 - sceneDetialAdapter=new ReportSceneAdapter(getActivity());  
49 - SceneDetialBean sceneDetialBean=new SceneDetialBean();  
50 - list.add(sceneDetialBean);  
51 - list.add(sceneDetialBean);  
52 - list.add(sceneDetialBean);  
53 - sceneDetialAdapter.addAll(list); 61 + sceneDetialAdapter = new ReportSceneAdapter(getActivity());
  62 + sceneDetialAdapter.addAll(scenenlist);
54 recycle_scene.setAdapter(sceneDetialAdapter); 63 recycle_scene.setAdapter(sceneDetialAdapter);
55 - 64 + mPresenter.reportSceneResult(sceneId,0,objectId,schoolId, 0,startData,endData);
56 initChartViews(); 65 initChartViews();
57 -  
58 -  
59 } 66 }
60 67
61 private void initChartViews() { 68 private void initChartViews() {
62 69
63 - chartView.setColors(R.color.textColor,R.color.huodong_blue,R.color.gray);  
64 - List<InputData> inputDataList=new ArrayList<>();  
65 - List<InputData> inputDataList1=new ArrayList<>();  
66 - List<InputData> inputDataList2=new ArrayList<>(); 70 + chartView.setColors(R.color.textColor, R.color.huodong_blue, R.color.gray);
  71 + List<InputData> inputDataList = new ArrayList<>();
  72 + List<InputData> inputDataList1 = new ArrayList<>();
  73 + List<InputData> inputDataList2 = new ArrayList<>();
67 for (int i = 0; i < 7; i++) { 74 for (int i = 0; i < 7; i++) {
68 - InputData inputData=new InputData("3/"+i,10*i); 75 + InputData inputData = new InputData("3/" + i, 10 * i);
69 inputDataList.add(inputData); 76 inputDataList.add(inputData);
70 } 77 }
71 78
72 chartView.setChartPaths(inputDataList); 79 chartView.setChartPaths(inputDataList);
73 80
74 for (int i = 0; i < 7; i++) { 81 for (int i = 0; i < 7; i++) {
75 - InputData inputData=new InputData("3/"+i,20*i); 82 + InputData inputData = new InputData("3/" + i, 20 * i);
76 inputDataList1.add(inputData); 83 inputDataList1.add(inputData);
77 } 84 }
78 85
79 chartView.setChartPaths(inputDataList1); 86 chartView.setChartPaths(inputDataList1);
80 87
81 for (int i = 0; i < 7; i++) { 88 for (int i = 0; i < 7; i++) {
82 - InputData inputData=new InputData("3/"+i,15*i); 89 + InputData inputData = new InputData("3/" + i, 15 * i);
83 inputDataList2.add(inputData); 90 inputDataList2.add(inputData);
84 } 91 }
85 92
@@ -88,5 +95,27 @@ public class ReportSceneFragment extends BaseMVPCompatFragment { @@ -88,5 +95,27 @@ public class ReportSceneFragment extends BaseMVPCompatFragment {
88 } 95 }
89 96
90 97
  98 + @Override
  99 + public void showSceneList(List<SceneDetialBean> list) {
  100 + scenenlist.clear();
  101 + scenenlist.addAll(list);
  102 + sceneDetialAdapter.addAll(scenenlist);
  103 + sceneDetialAdapter.notifyDataSetChanged();
  104 + }
  105 +
  106 + @SuppressLint("ResourceAsColor")
  107 + @Override
  108 + public void showSceneInfo(String rank, String scoree, String pscoree,String sceneName) {
  109 + tv_rank.setText("等级:" + rank);
  110 + if(!scoree.startsWith("-")){
  111 + scoree="+"+scoree;
  112 + tv_scoree.setTextColor(R.color.textGreen);
  113 + }else{
  114 + tv_scoree.setTextColor(R.color.textRed);
  115 + }
  116 + tv_scoree.setText("得分:" + scoree);
  117 + tv_pscoree.setText("绩点:" + pscoree);
  118 + tv_sceneName.setText(sceneName);
  119 + }
91 120
92 } 121 }
app/src/main/java/com/shunzhi/parent/util/SystemHelper.java
@@ -23,6 +23,7 @@ import android.net.NetworkInfo.State; @@ -23,6 +23,7 @@ import android.net.NetworkInfo.State;
23 import android.net.Uri; 23 import android.net.Uri;
24 import android.os.Build; 24 import android.os.Build;
25 import android.support.v4.app.ActivityCompat; 25 import android.support.v4.app.ActivityCompat;
  26 +import android.support.v4.content.FileProvider;
26 import android.telephony.TelephonyManager; 27 import android.telephony.TelephonyManager;
27 import android.util.DisplayMetrics; 28 import android.util.DisplayMetrics;
28 import android.view.Window; 29 import android.view.Window;
@@ -41,6 +42,7 @@ import timber.log.Timber; @@ -41,6 +42,7 @@ import timber.log.Timber;
41 42
42 /** 43 /**
43 * 获取系统信息的工具类 44 * 获取系统信息的工具类
  45 + *
44 * @author hjgang 46 * @author hjgang
45 */ 47 */
46 public class SystemHelper { 48 public class SystemHelper {
@@ -50,6 +52,7 @@ public class SystemHelper { @@ -50,6 +52,7 @@ public class SystemHelper {
50 /** 52 /**
51 * 创建本应用的桌面快捷方式<br/> 53 * 创建本应用的桌面快捷方式<br/>
52 * 注意:需要添加权限&lt;uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/&gt; 54 * 注意:需要添加权限&lt;uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/&gt;
  55 + *
53 * @param 56 * @param
54 */ 57 */
55 public static void createShortcut(Context context, Class<?> clazz) { 58 public static void createShortcut(Context context, Class<?> clazz) {
@@ -74,6 +77,7 @@ public class SystemHelper { @@ -74,6 +77,7 @@ public class SystemHelper {
74 77
75 /** 78 /**
76 * 字符串转换成date 79 * 字符串转换成date
  80 + *
77 * @param time 81 * @param time
78 * @return 82 * @return
79 */ 83 */
@@ -92,6 +96,7 @@ public class SystemHelper { @@ -92,6 +96,7 @@ public class SystemHelper {
92 96
93 /** 97 /**
94 * 将字符串转为 时间戳 98 * 将字符串转为 时间戳
  99 + *
95 * @param time 100 * @param time
96 * @return 101 * @return
97 */ 102 */
@@ -111,7 +116,7 @@ public class SystemHelper { @@ -111,7 +116,7 @@ public class SystemHelper {
111 /** 116 /**
112 * 将时间戳转为 字符串 117 * 将时间戳转为 字符串
113 * yyyy-MM-dd HH:mm 118 * yyyy-MM-dd HH:mm
114 - * */ 119 + */
115 public static String getTimeStr(String time) { 120 public static String getTimeStr(String time) {
116 121
117 String newtime = null; 122 String newtime = null;
@@ -125,7 +130,7 @@ public class SystemHelper { @@ -125,7 +130,7 @@ public class SystemHelper {
125 /** 130 /**
126 * 将时间戳转为 字符串 131 * 将时间戳转为 字符串
127 * yyyy-MM-dd 132 * yyyy-MM-dd
128 - * */ 133 + */
129 public static String getTimeStr3(String time) { 134 public static String getTimeStr3(String time) {
130 String newtime = null; 135 String newtime = null;
131 SimpleDateFormat sdfDateFormat = new SimpleDateFormat("yyyy-MM-dd"); 136 SimpleDateFormat sdfDateFormat = new SimpleDateFormat("yyyy-MM-dd");
@@ -177,11 +182,11 @@ public class SystemHelper { @@ -177,11 +182,11 @@ public class SystemHelper {
177 } 182 }
178 183
179 /** 184 /**
180 - * @author LuoB.  
181 * @param oldTime 较小的时间 185 * @param oldTime 较小的时间
182 * @param newTime 较大的时间 (如果为空 默认当前时间 ,表示和当前时间相比) 186 * @param newTime 较大的时间 (如果为空 默认当前时间 ,表示和当前时间相比)
183 * @return -1 :同一天. 0:昨天 . 1 :至少是前天. 187 * @return -1 :同一天. 0:昨天 . 1 :至少是前天.
184 * @throws ParseException 转换异常 188 * @throws ParseException 转换异常
  189 + * @author LuoB.
185 */ 190 */
186 public static int isYeaterday(Date oldTime, Date newTime) throws ParseException { 191 public static int isYeaterday(Date oldTime, Date newTime) throws ParseException {
187 if (newTime == null) { 192 if (newTime == null) {
@@ -204,6 +209,7 @@ public class SystemHelper { @@ -204,6 +209,7 @@ public class SystemHelper {
204 /** 209 /**
205 * 检查是否已经创建了桌面快捷方式<br/> 210 * 检查是否已经创建了桌面快捷方式<br/>
206 * 注意:需要添加权限&lt;uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/&gt; 211 * 注意:需要添加权限&lt;uses-permission android:name="com.android.launcher.permission.READ_SETTINGS"/&gt;
  212 + *
207 * @param context 213 * @param context
208 * @return 214 * @return
209 */ 215 */
@@ -336,6 +342,7 @@ public class SystemHelper { @@ -336,6 +342,7 @@ public class SystemHelper {
336 342
337 /** 343 /**
338 * 返回当前程序版本代码,如:1 344 * 返回当前程序版本代码,如:1
  345 + *
339 * @param context 346 * @param context
340 * @return 当前程序版本代码 347 * @return 当前程序版本代码
341 */ 348 */
@@ -347,7 +354,7 @@ public class SystemHelper { @@ -347,7 +354,7 @@ public class SystemHelper {
347 versionCode = pi.versionCode; 354 versionCode = pi.versionCode;
348 355
349 } catch (Exception e) { 356 } catch (Exception e) {
350 - Timber.d("66666%s" ,e.toString()+ ""); 357 + Timber.d("66666%s", e.toString() + "");
351 } 358 }
352 return versionCode; 359 return versionCode;
353 } 360 }
@@ -375,13 +382,20 @@ public class SystemHelper { @@ -375,13 +382,20 @@ public class SystemHelper {
375 * 安装指定的APK文件,主要用于本应用程序的更新 382 * 安装指定的APK文件,主要用于本应用程序的更新
376 * 383 *
377 * @param context 384 * @param context
378 - * @param apk  
379 - * apk文件的全路径名 385 + * @param apk apk文件的全路径名
380 */ 386 */
381 public static void installAPK(Context context, String apk) { 387 public static void installAPK(Context context, String apk) {
382 Intent intent = new Intent(Intent.ACTION_VIEW); 388 Intent intent = new Intent(Intent.ACTION_VIEW);
383 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 389 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
384 - intent.setDataAndType(Uri.fromFile(new File(apk)), "application/vnd.android.package-archive"); 390 + Uri data;
  391 +
  392 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
  393 + data = FileProvider.getUriForFile(context, "com.shunzhi.parent.fileprovider", new File(apk));
  394 +// 给目标应用一个临时授权
  395 + intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
  396 + } else data = Uri.fromFile(new File(apk));
  397 +
  398 + intent.setDataAndType(data, "application/vnd.android.package-archive");
385 context.startActivity(intent); 399 context.startActivity(intent);
386 android.os.Process.killProcess(android.os.Process.myPid()); 400 android.os.Process.killProcess(android.os.Process.myPid());
387 } 401 }
app/src/main/res/drawable-hdpi/kaoqin.png 0 → 100644

878 Bytes

app/src/main/res/drawable-xhdpi/kaoqin.png 0 → 100644

1.04 KB

app/src/main/res/drwable-xxhdpi/kaoqin.png 0 → 100644

4.16 KB

app/src/main/res/layout/fragment_cheng_zhang.xml 0 → 100644
@@ -0,0 +1,125 @@ @@ -0,0 +1,125 @@
  1 +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 + xmlns:tools="http://schemas.android.com/tools"
  3 + android:layout_width="match_parent"
  4 + android:layout_height="match_parent"
  5 + android:background="@color/white"
  6 + tools:context="com.shunzhi.parent.ui.fragment.report.ChengZhangFragment">
  7 +
  8 + <include layout="@layout/layout_chengzhang"/>
  9 +
  10 + <LinearLayout
  11 + android:layout_margin="@dimen/size_dp_10"
  12 + android:id="@+id/layout_report"
  13 + android:layout_width="match_parent"
  14 + android:layout_height="match_parent"
  15 + android:orientation="vertical">
  16 +
  17 + <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"-->
  18 +
  19 + <com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView xmlns:app="http://schemas.android.com/apk/res-auto"
  20 + android:id="@+id/slidelayout"
  21 + android:layout_width="match_parent"
  22 + android:layout_height="match_parent">
  23 +
  24 + <com.prolificinteractive.materialcalendarview.MaterialCalendarView
  25 + android:id="@+id/calendarView_month_mode"
  26 + android:layout_width="match_parent"
  27 + android:layout_height="wrap_content"
  28 + android:background="@color/white"
  29 + app:mcv_calendarMode="month"
  30 + app:mcv_dateTextAppearance="@style/TextAppearance.MaterialCalendarWidget.Date"
  31 + app:mcv_selectionColor="@color/huodong_blue"
  32 + app:mcv_showOtherDates="defaults|other_months"
  33 + app:mcv_showWeekView="false" />
  34 +
  35 + <com.prolificinteractive.materialcalendarview.MaterialCalendarView
  36 + android:id="@+id/calendarView_week_mode"
  37 + android:layout_width="match_parent"
  38 + android:layout_height="wrap_content"
  39 + android:background="@android:color/white"
  40 + android:visibility="invisible"
  41 + app:mcv_calendarMode="week"
  42 + app:mcv_dateTextAppearance="@style/TextAppearance.MaterialCalendarWidget.Date"
  43 + app:mcv_selectionColor="@color/huodong_blue"
  44 + app:mcv_showTopBar="false"
  45 + app:mcv_showWeekView="false" />
  46 +
  47 + <android.support.v7.widget.RecyclerView
  48 + android:id="@+id/recycle_report"
  49 + android:layout_width="match_parent"
  50 + android:layout_height="match_parent"
  51 + android:background="@color/bgColor"
  52 + >
  53 +
  54 + </android.support.v7.widget.RecyclerView>
  55 +
  56 + <LinearLayout
  57 + android:id="@+id/weekview_top"
  58 + android:layout_width="match_parent"
  59 + android:layout_height="44dp"
  60 + android:background="@color/white"
  61 + android:orientation="horizontal">
  62 +
  63 + <TextView
  64 + android:layout_width="0dp"
  65 + android:layout_height="match_parent"
  66 + android:layout_weight="1"
  67 + android:gravity="center"
  68 + android:text="周日"
  69 + android:textSize="@dimen/textSize16" />
  70 +
  71 + <TextView
  72 + android:layout_width="0dp"
  73 + android:layout_height="match_parent"
  74 + android:layout_weight="1"
  75 + android:gravity="center"
  76 + android:text="周一"
  77 + android:textSize="@dimen/textSize16" />
  78 +
  79 + <TextView
  80 + android:layout_width="0dp"
  81 + android:layout_height="match_parent"
  82 + android:layout_weight="1"
  83 + android:gravity="center"
  84 + android:text="周二"
  85 + android:textSize="@dimen/textSize16" />
  86 +
  87 + <TextView
  88 + android:layout_width="0dp"
  89 + android:layout_height="match_parent"
  90 + android:layout_weight="1"
  91 + android:gravity="center"
  92 + android:text="周三"
  93 + android:textSize="@dimen/textSize16" />
  94 +
  95 + <TextView
  96 + android:layout_width="0dp"
  97 + android:layout_height="match_parent"
  98 + android:layout_weight="1"
  99 + android:gravity="center"
  100 + android:text="周四"
  101 + android:textSize="@dimen/textSize16" />
  102 +
  103 + <TextView
  104 + android:layout_width="0dp"
  105 + android:layout_height="match_parent"
  106 + android:layout_weight="1"
  107 + android:gravity="center"
  108 + android:text="周五"
  109 + android:textSize="@dimen/textSize16" />
  110 +
  111 + <TextView
  112 + android:layout_width="0dp"
  113 + android:layout_height="match_parent"
  114 + android:layout_weight="1"
  115 + android:gravity="center"
  116 + android:text="周六"
  117 + android:textSize="@dimen/textSize16" />
  118 +
  119 + </LinearLayout>
  120 +
  121 + </com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView>
  122 +
  123 + </LinearLayout>
  124 +
  125 +</FrameLayout>
app/src/main/res/layout/fragment_consult_one_level.xml
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 android:id="@+id/recyclerViewGrally" 10 android:id="@+id/recyclerViewGrally"
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 android:layout_height="180dp" 12 android:layout_height="180dp"
  13 + android:background="@color/bgColor"
13 ></android.support.v7.widget.RecyclerView> 14 ></android.support.v7.widget.RecyclerView>
14 15
15 <include layout="@layout/layout_textandimgshow"/> 16 <include layout="@layout/layout_textandimgshow"/>
app/src/main/res/layout/fragment_report.xml
@@ -2,11 +2,12 @@ @@ -2,11 +2,12 @@
2 xmlns:tools="http://schemas.android.com/tools" 2 xmlns:tools="http://schemas.android.com/tools"
3 android:layout_width="match_parent" 3 android:layout_width="match_parent"
4 android:layout_height="match_parent" 4 android:layout_height="match_parent"
  5 + xmlns:app="http://schemas.android.com/apk/res-auto"
5 android:background="@color/bgColor" 6 android:background="@color/bgColor"
6 android:orientation="vertical" 7 android:orientation="vertical"
7 tools:context="com.shunzhi.parent.ui.fragment.ReportFragment"> 8 tools:context="com.shunzhi.parent.ui.fragment.ReportFragment">
8 9
9 - <LinearLayout 10 + <FrameLayout
10 android:id="@+id/top_layout" 11 android:id="@+id/top_layout"
11 android:layout_width="match_parent" 12 android:layout_width="match_parent"
12 android:layout_height="?android:actionBarSize" 13 android:layout_height="?android:actionBarSize"
@@ -26,6 +27,7 @@ @@ -26,6 +27,7 @@
26 android:textSize="@dimen/textSize16" /> 27 android:textSize="@dimen/textSize16" />
27 28
28 <TextView 29 <TextView
  30 + android:visibility="gone"
29 android:id="@+id/tvDate" 31 android:id="@+id/tvDate"
30 android:layout_width="wrap_content" 32 android:layout_width="wrap_content"
31 android:layout_height="wrap_content" 33 android:layout_height="wrap_content"
@@ -36,22 +38,38 @@ @@ -36,22 +38,38 @@
36 android:textColor="@color/white" 38 android:textColor="@color/white"
37 android:textSize="@dimen/textSize18" /> 39 android:textSize="@dimen/textSize18" />
38 40
  41 + <android.support.design.widget.TabLayout
  42 + android:layout_width="wrap_content"
  43 + android:layout_gravity="center"
  44 + app:tabIndicatorColor="@color/white"
  45 + app:tabSelectedTextColor="@color/white"
  46 + app:tabTextColor="@color/textColor"
  47 + app:tabMaxWidth="@dimen/size_dp_60"
  48 + android:layout_height="wrap_content"
  49 + android:id="@+id/tabLayout"
  50 + app:tabIndicatorHeight="@dimen/size_dp_3"
  51 + app:tabMode="scrollable"
  52 + app:tabGravity="fill"
  53 + app:tabTextAppearance="@style/TextView_Wrap_16"
  54 + ></android.support.design.widget.TabLayout>
  55 +
39 <TextView 56 <TextView
40 android:id="@+id/tvShaiXuan" 57 android:id="@+id/tvShaiXuan"
  58 + android:visibility="gone"
41 android:layout_width="wrap_content" 59 android:layout_width="wrap_content"
42 android:layout_height="wrap_content" 60 android:layout_height="wrap_content"
43 - android:layout_gravity="center_vertical" 61 + android:layout_gravity="center_vertical|right"
44 android:drawableRight="@drawable/screen" 62 android:drawableRight="@drawable/screen"
45 android:text="筛选" 63 android:text="筛选"
46 android:textColor="@color/white" 64 android:textColor="@color/white"
47 android:textSize="@dimen/textSize16" /> 65 android:textSize="@dimen/textSize16" />
48 - </LinearLayout> 66 + </FrameLayout>
49 67
50 <RelativeLayout 68 <RelativeLayout
51 android:layout_width="match_parent" 69 android:layout_width="match_parent"
52 android:layout_height="match_parent" 70 android:layout_height="match_parent"
53 android:background="@color/white" 71 android:background="@color/white"
54 - android:visibility="gone" 72 + android:visibility="visible"
55 73
56 > 74 >
57 75
@@ -66,118 +84,12 @@ @@ -66,118 +84,12 @@
66 android:textSize="@dimen/size_dp_16" /> 84 android:textSize="@dimen/size_dp_16" />
67 </RelativeLayout> 85 </RelativeLayout>
68 86
69 - <LinearLayout 87 + <android.support.v4.view.ViewPager
  88 + android:visibility="visible"
70 android:layout_width="match_parent" 89 android:layout_width="match_parent"
71 android:layout_height="match_parent" 90 android:layout_height="match_parent"
72 - android:orientation="vertical">  
73 -  
74 - <!--<include layout="@layout/layout_week" /> android:layout_below="@+id/linearlayout"-->  
75 -  
76 - <com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView xmlns:app="http://schemas.android.com/apk/res-auto"  
77 - android:id="@+id/slidelayout"  
78 - android:layout_width="match_parent"  
79 - android:layout_height="match_parent">  
80 -  
81 - <com.prolificinteractive.materialcalendarview.MaterialCalendarView  
82 - android:id="@+id/calendarView_month_mode"  
83 - android:layout_width="match_parent"  
84 - android:layout_height="wrap_content"  
85 - android:background="@color/white"  
86 - app:mcv_calendarMode="month"  
87 - app:mcv_dateTextAppearance="@style/TextAppearance.MaterialCalendarWidget.Date"  
88 - app:mcv_selectionColor="@color/huodong_blue"  
89 - app:mcv_showOtherDates="defaults|other_months"  
90 - app:mcv_showWeekView="false" />  
91 -  
92 - <com.prolificinteractive.materialcalendarview.MaterialCalendarView  
93 - android:id="@+id/calendarView_week_mode"  
94 - android:layout_width="match_parent"  
95 - android:layout_height="wrap_content"  
96 - android:background="@android:color/white"  
97 - android:visibility="invisible"  
98 - app:mcv_calendarMode="week"  
99 - app:mcv_dateTextAppearance="@style/TextAppearance.MaterialCalendarWidget.Date"  
100 - app:mcv_selectionColor="@color/huodong_blue"  
101 - app:mcv_showTopBar="false"  
102 - app:mcv_showWeekView="false" />  
103 -  
104 -  
105 - <android.support.v7.widget.RecyclerView  
106 - android:id="@+id/recycle_report"  
107 - android:layout_width="match_parent"  
108 - android:layout_height="match_parent"  
109 - android:background="@color/bgColor"  
110 - android:padding="@dimen/size_dp_10">  
111 -  
112 - </android.support.v7.widget.RecyclerView>  
113 -  
114 - <LinearLayout  
115 - android:id="@+id/weekview_top"  
116 - android:layout_width="match_parent"  
117 - android:layout_height="44dp"  
118 - android:background="@color/white"  
119 - android:orientation="horizontal">  
120 -  
121 - <TextView  
122 - android:layout_width="0dp"  
123 - android:layout_height="match_parent"  
124 - android:layout_weight="1"  
125 - android:gravity="center"  
126 - android:text="周日"  
127 - android:textSize="@dimen/textSize16" />  
128 -  
129 - <TextView  
130 - android:layout_width="0dp"  
131 - android:layout_height="match_parent"  
132 - android:layout_weight="1"  
133 - android:gravity="center"  
134 - android:text="周一"  
135 - android:textSize="@dimen/textSize16" />  
136 -  
137 - <TextView  
138 - android:layout_width="0dp"  
139 - android:layout_height="match_parent"  
140 - android:layout_weight="1"  
141 - android:gravity="center"  
142 - android:text="周二"  
143 - android:textSize="@dimen/textSize16" />  
144 -  
145 - <TextView  
146 - android:layout_width="0dp"  
147 - android:layout_height="match_parent"  
148 - android:layout_weight="1"  
149 - android:gravity="center"  
150 - android:text="周三"  
151 - android:textSize="@dimen/textSize16" />  
152 -  
153 - <TextView  
154 - android:layout_width="0dp"  
155 - android:layout_height="match_parent"  
156 - android:layout_weight="1"  
157 - android:gravity="center"  
158 - android:text="周四"  
159 - android:textSize="@dimen/textSize16" />  
160 -  
161 - <TextView  
162 - android:layout_width="0dp"  
163 - android:layout_height="match_parent"  
164 - android:layout_weight="1"  
165 - android:gravity="center"  
166 - android:text="周五"  
167 - android:textSize="@dimen/textSize16" />  
168 -  
169 - <TextView  
170 - android:layout_width="0dp"  
171 - android:layout_height="match_parent"  
172 - android:layout_weight="1"  
173 - android:gravity="center"  
174 - android:text="周六"  
175 - android:textSize="@dimen/textSize16" />  
176 -  
177 - </LinearLayout>  
178 -  
179 - </com.amy.monthweek.materialcalendarview.MonthWeekMaterialCalendarView> 91 + android:id="@+id/viewPager"
  92 + ></android.support.v4.view.ViewPager>
180 93
181 - </LinearLayout>  
182 94
183 </LinearLayout> 95 </LinearLayout>
app/src/main/res/layout/fragment_report_detial.xml
@@ -60,6 +60,7 @@ @@ -60,6 +60,7 @@
60 android:textSize="@dimen/sp_16" /> 60 android:textSize="@dimen/sp_16" />
61 61
62 <TextView 62 <TextView
  63 + android:id="@+id/tv_source"
63 android:layout_width="wrap_content" 64 android:layout_width="wrap_content"
64 android:layout_height="wrap_content" 65 android:layout_height="wrap_content"
65 android:gravity="center" 66 android:gravity="center"
@@ -70,6 +71,7 @@ @@ -70,6 +71,7 @@
70 android:textSize="@dimen/dp_36" /> 71 android:textSize="@dimen/dp_36" />
71 72
72 <TextView 73 <TextView
  74 + android:id="@+id/tv_bijiao1"
73 android:layout_width="wrap_content" 75 android:layout_width="wrap_content"
74 android:layout_height="wrap_content" 76 android:layout_height="wrap_content"
75 android:layout_marginTop="10dp" 77 android:layout_marginTop="10dp"
@@ -80,6 +82,7 @@ @@ -80,6 +82,7 @@
80 android:textSize="@dimen/sp_16" /> 82 android:textSize="@dimen/sp_16" />
81 83
82 <TextView 84 <TextView
  85 + android:id="@+id/tv_bijiao2"
83 android:layout_width="wrap_content" 86 android:layout_width="wrap_content"
84 android:layout_height="wrap_content" 87 android:layout_height="wrap_content"
85 android:layout_marginTop="5dp" 88 android:layout_marginTop="5dp"
@@ -99,6 +102,7 @@ @@ -99,6 +102,7 @@
99 android:orientation="vertical"> 102 android:orientation="vertical">
100 103
101 <TextView 104 <TextView
  105 + android:id="@+id/tv_date"
102 android:layout_width="wrap_content" 106 android:layout_width="wrap_content"
103 android:layout_height="wrap_content" 107 android:layout_height="wrap_content"
104 android:layout_gravity="center" 108 android:layout_gravity="center"
@@ -109,6 +113,7 @@ @@ -109,6 +113,7 @@
109 android:textSize="@dimen/sp_16" /> 113 android:textSize="@dimen/sp_16" />
110 114
111 <TextView 115 <TextView
  116 + android:id="@+id/tv_ranking"
112 android:layout_width="wrap_content" 117 android:layout_width="wrap_content"
113 android:layout_height="wrap_content" 118 android:layout_height="wrap_content"
114 android:gravity="center" 119 android:gravity="center"
@@ -119,6 +124,7 @@ @@ -119,6 +124,7 @@
119 android:textSize="@dimen/dp_36" /> 124 android:textSize="@dimen/dp_36" />
120 125
121 <TextView 126 <TextView
  127 + android:id="@+id/tv_bijiao3"
122 android:layout_width="wrap_content" 128 android:layout_width="wrap_content"
123 android:layout_height="wrap_content" 129 android:layout_height="wrap_content"
124 android:layout_marginTop="10dp" 130 android:layout_marginTop="10dp"
@@ -129,6 +135,7 @@ @@ -129,6 +135,7 @@
129 android:textSize="@dimen/sp_16" /> 135 android:textSize="@dimen/sp_16" />
130 136
131 <TextView 137 <TextView
  138 + android:id="@+id/tv_bijiao4"
132 android:layout_width="wrap_content" 139 android:layout_width="wrap_content"
133 android:layout_height="wrap_content" 140 android:layout_height="wrap_content"
134 android:layout_marginTop="5dp" 141 android:layout_marginTop="5dp"
@@ -145,6 +152,7 @@ @@ -145,6 +152,7 @@
145 </LinearLayout> 152 </LinearLayout>
146 153
147 <TextView 154 <TextView
  155 + android:id="@+id/tv_describe"
148 android:layout_width="match_parent" 156 android:layout_width="match_parent"
149 android:layout_height="wrap_content" 157 android:layout_height="wrap_content"
150 android:layout_marginTop="@dimen/size_dp_30" 158 android:layout_marginTop="@dimen/size_dp_30"
app/src/main/res/layout/fragment_report_scene.xml
@@ -64,6 +64,7 @@ @@ -64,6 +64,7 @@
64 android:orientation="vertical"> 64 android:orientation="vertical">
65 65
66 <TextView 66 <TextView
  67 + android:id="@+id/sceneName"
67 android:layout_width="wrap_content" 68 android:layout_width="wrap_content"
68 android:layout_height="wrap_content" 69 android:layout_height="wrap_content"
69 android:gravity="center" 70 android:gravity="center"
@@ -72,6 +73,7 @@ @@ -72,6 +73,7 @@
72 android:textSize="@dimen/sp_16" /> 73 android:textSize="@dimen/sp_16" />
73 74
74 <TextView 75 <TextView
  76 + android:id="@+id/scoree"
75 android:layout_width="wrap_content" 77 android:layout_width="wrap_content"
76 android:layout_height="wrap_content" 78 android:layout_height="wrap_content"
77 android:layout_marginTop="10dp" 79 android:layout_marginTop="10dp"
@@ -81,6 +83,7 @@ @@ -81,6 +83,7 @@
81 android:textSize="@dimen/sp_16" /> 83 android:textSize="@dimen/sp_16" />
82 84
83 <TextView 85 <TextView
  86 + android:id="@+id/pscoree"
84 android:layout_width="wrap_content" 87 android:layout_width="wrap_content"
85 android:layout_height="wrap_content" 88 android:layout_height="wrap_content"
86 android:layout_marginTop="10dp" 89 android:layout_marginTop="10dp"
@@ -90,6 +93,7 @@ @@ -90,6 +93,7 @@
90 android:textSize="@dimen/sp_16" /> 93 android:textSize="@dimen/sp_16" />
91 94
92 <TextView 95 <TextView
  96 + android:id="@+id/rank"
93 android:layout_width="wrap_content" 97 android:layout_width="wrap_content"
94 android:layout_height="wrap_content" 98 android:layout_height="wrap_content"
95 android:layout_marginTop="5dp" 99 android:layout_marginTop="5dp"
app/src/main/res/layout/fragment_start.xml
1 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 1 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2 + xmlns:app="http://schemas.android.com/apk/res-auto"
2 xmlns:tools="http://schemas.android.com/tools" 3 xmlns:tools="http://schemas.android.com/tools"
3 android:layout_width="match_parent" 4 android:layout_width="match_parent"
4 android:layout_height="match_parent" 5 android:layout_height="match_parent"
5 android:background="@color/bgColor" 6 android:background="@color/bgColor"
6 - xmlns:app="http://schemas.android.com/apk/res-auto"  
7 tools:context="com.shunzhi.parent.ui.fragment.StartFragment"> 7 tools:context="com.shunzhi.parent.ui.fragment.StartFragment">
8 8
9 - <com.stx.xhb.xbanner.XBanner 9 + <LinearLayout
10 android:layout_width="match_parent" 10 android:layout_width="match_parent"
11 android:layout_height="match_parent" 11 android:layout_height="match_parent"
12 - android:id="@+id/xBanner"  
13 - ></com.stx.xhb.xbanner.XBanner> 12 + android:orientation="vertical">
14 13
15 - <cn.jzvd.JZVideoPlayerStandard  
16 - android:id="@+id/jiecaoVideo"  
17 - android:visibility="gone"  
18 - android:layout_width="match_parent"  
19 - android:layout_height="match_parent"></cn.jzvd.JZVideoPlayerStandard> 14 + <com.stx.xhb.xbanner.XBanner
  15 + android:id="@+id/xBanner"
  16 + android:layout_width="match_parent"
  17 + android:layout_height="match_parent"></com.stx.xhb.xbanner.XBanner>
  18 +
  19 + <com.share.mvpsdk.view.MyVieoView
  20 + android:id="@+id/myVideoView"
  21 + android:layout_width="match_parent"
  22 + android:layout_height="match_parent"
  23 + android:visibility="visible" />
  24 + </LinearLayout>
20 25
21 <TextView 26 <TextView
22 android:id="@+id/tvJump" 27 android:id="@+id/tvJump"
23 android:layout_width="@dimen/size_dp_50" 28 android:layout_width="@dimen/size_dp_50"
24 android:layout_height="@dimen/size_dp_50" 29 android:layout_height="@dimen/size_dp_50"
25 - android:text="跳过"  
26 - android:gravity="center"  
27 - android:textColor="@color/white"  
28 - android:textSize="@dimen/size_dp_12"  
29 android:layout_gravity="right" 30 android:layout_gravity="right"
30 android:layout_margin="@dimen/size_dp_10" 31 android:layout_margin="@dimen/size_dp_10"
31 android:background="@drawable/shape_xueqing_radius25" 32 android:background="@drawable/shape_xueqing_radius25"
32 - /> 33 + android:gravity="center"
  34 + android:text="跳过"
  35 + android:textColor="@color/white"
  36 + android:textSize="@dimen/size_dp_12" />
33 </FrameLayout> 37 </FrameLayout>
app/src/main/res/layout/item_deyu_detial.xml
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 android:orientation="vertical"> 19 android:orientation="vertical">
20 20
21 <TextView 21 <TextView
22 - android:id="@+id/txt_childname" 22 + android:id="@+id/txt_name"
23 android:layout_width="wrap_content" 23 android:layout_width="wrap_content"
24 android:layout_height="wrap_content" 24 android:layout_height="wrap_content"
25 android:textSize="@dimen/txtsize_title" 25 android:textSize="@dimen/txtsize_title"
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 47
48 48
49 <TextView 49 <TextView
50 - android:id="@+id/go_buy" 50 + android:id="@+id/pingjia"
51 android:layout_width="wrap_content" 51 android:layout_width="wrap_content"
52 android:layout_height="wrap_content" 52 android:layout_height="wrap_content"
53 android:paddingTop="5dp" 53 android:paddingTop="5dp"
app/src/main/res/layout/item_grally.xml
@@ -2,9 +2,8 @@ @@ -2,9 +2,8 @@
2 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="wrap_content" 3 android:layout_width="wrap_content"
4 android:layout_height="match_parent" 4 android:layout_height="match_parent"
5 - android:layout_margin="@dimen/size_dp_10"  
6 android:id="@+id/frame_root" 5 android:id="@+id/frame_root"
7 - android:background="@color/txt_black"> 6 + android:background="@color/white">
8 7
9 8
10 <ImageView 9 <ImageView
@@ -22,8 +21,8 @@ @@ -22,8 +21,8 @@
22 android:paddingBottom="@dimen/size_dp_3" 21 android:paddingBottom="@dimen/size_dp_3"
23 android:paddingLeft="@dimen/size_dp_10" 22 android:paddingLeft="@dimen/size_dp_10"
24 android:paddingTop="@dimen/size_dp_3" 23 android:paddingTop="@dimen/size_dp_3"
25 - android:text="撒飞洒发发"  
26 - android:textColor="@color/white" 24 + android:text=""
  25 + android:textColor="@color/textColor"
27 android:textSize="@dimen/textSize16" /> 26 android:textSize="@dimen/textSize16" />
28 27
29 </FrameLayout> 28 </FrameLayout>
30 \ No newline at end of file 29 \ No newline at end of file
app/src/main/res/layout/item_report_deyu.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="wrap_content"
  5 + android:background="@color/bgColor">
5 6
6 <LinearLayout 7 <LinearLayout
7 android:layout_width="match_parent" 8 android:layout_width="match_parent"
@@ -88,7 +89,7 @@ @@ -88,7 +89,7 @@
88 android:height="40dp" 89 android:height="40dp"
89 android:gravity="center" 90 android:gravity="center"
90 android:paddingLeft="20dp" 91 android:paddingLeft="20dp"
91 - android:text="3月4日语文作业" 92 + android:text="3月4日德育报告"
92 android:textColor="@color/deyu_BlueColor" 93 android:textColor="@color/deyu_BlueColor"
93 android:textSize="@dimen/sp_14" /> 94 android:textSize="@dimen/sp_14" />
94 95
app/src/main/res/layout/layout_chengzhang.xml 0 → 100644
@@ -0,0 +1,108 @@ @@ -0,0 +1,108 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:id="@+id/layout_chengzhang"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="match_parent"
  6 + android:background="@color/white"
  7 + android:layout_margin="@dimen/size_dp_10"
  8 + android:orientation="vertical">
  9 +
  10 + <TextView
  11 + android:layout_width="wrap_content"
  12 + android:layout_height="wrap_content"
  13 + android:layout_gravity="center_horizontal"
  14 + android:layout_marginTop="@dimen/size_dp_10"
  15 + android:text="智能校卫"
  16 + android:textColor="@color/textColor"
  17 + android:textSize="@dimen/size_dp_16" />
  18 +
  19 +
  20 + <LinearLayout
  21 + android:id="@+id/layout_kaoqin"
  22 + android:layout_width="match_parent"
  23 + android:layout_height="?android:actionBarSize"
  24 + android:layout_marginLeft="@dimen/size_dp_10"
  25 + android:layout_marginRight="@dimen/size_dp_10"
  26 + android:layout_marginTop="@dimen/size_dp_10"
  27 + android:background="@drawable/shape_corner_bg"
  28 + android:orientation="horizontal">
  29 +
  30 + <ImageView
  31 + android:layout_width="wrap_content"
  32 + android:layout_height="match_parent"
  33 + android:layout_gravity="center_vertical"
  34 + android:layout_margin="@dimen/size_dp_5"
  35 + android:scaleType="fitCenter"
  36 + android:src="@drawable/kaoqin" />
  37 +
  38 + <TextView
  39 + android:layout_width="wrap_content"
  40 + android:layout_height="wrap_content"
  41 + android:layout_gravity="center_vertical"
  42 + android:layout_marginLeft="@dimen/size_dp_15"
  43 + android:text="考勤"
  44 + android:textColor="@color/textColor"
  45 + android:textSize="@dimen/size_dp_16" />
  46 +
  47 + </LinearLayout>
  48 +
  49 +
  50 + <LinearLayout
  51 + android:id="@+id/layout_buka"
  52 + android:layout_width="match_parent"
  53 + android:layout_height="?android:actionBarSize"
  54 + android:layout_marginLeft="@dimen/size_dp_10"
  55 + android:layout_marginRight="@dimen/size_dp_10"
  56 + android:layout_marginTop="@dimen/size_dp_10"
  57 + android:background="@drawable/shape_corner_bg"
  58 + android:orientation="horizontal">
  59 +
  60 + <ImageView
  61 + android:layout_width="wrap_content"
  62 + android:layout_height="wrap_content"
  63 + android:layout_gravity="center_vertical"
  64 + android:layout_margin="@dimen/size_dp_5"
  65 + android:scaleType="fitXY"
  66 + android:src="@drawable/kaoqin" />
  67 +
  68 + <TextView
  69 + android:layout_width="wrap_content"
  70 + android:layout_height="wrap_content"
  71 + android:layout_gravity="center_vertical"
  72 + android:layout_marginLeft="@dimen/size_dp_15"
  73 + android:text="补卡"
  74 + android:textColor="@color/textColor"
  75 + android:textSize="@dimen/size_dp_16" />
  76 +
  77 + </LinearLayout>
  78 +
  79 + <LinearLayout
  80 + android:id="@+id/layout_qingjia"
  81 + android:layout_width="match_parent"
  82 + android:layout_height="?android:actionBarSize"
  83 + android:layout_marginLeft="@dimen/size_dp_10"
  84 + android:layout_marginRight="@dimen/size_dp_10"
  85 + android:layout_marginTop="@dimen/size_dp_10"
  86 + android:background="@drawable/shape_corner_bg"
  87 + android:orientation="horizontal">
  88 +
  89 + <ImageView
  90 + android:layout_width="wrap_content"
  91 + android:layout_height="wrap_content"
  92 + android:layout_gravity="center_vertical"
  93 + android:layout_margin="@dimen/size_dp_5"
  94 + android:scaleType="fitXY"
  95 + android:src="@drawable/kaoqin" />
  96 +
  97 + <TextView
  98 + android:layout_width="wrap_content"
  99 + android:layout_height="wrap_content"
  100 + android:layout_gravity="center_vertical"
  101 + android:layout_marginLeft="@dimen/size_dp_15"
  102 + android:text="请假"
  103 + android:textColor="@color/textColor"
  104 + android:textSize="@dimen/size_dp_16" />
  105 +
  106 + </LinearLayout>
  107 +
  108 +</LinearLayout>
0 \ No newline at end of file 109 \ No newline at end of file
app/src/main/res/menu/bottom_navigationview.xml
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <menu xmlns:android="http://schemas.android.com/apk/res/android"> 2 <menu xmlns:android="http://schemas.android.com/apk/res/android">
3 3
4 - <item android:id="@+id/menu_item_index"  
5 - android:icon="@drawable/selector_ceping"  
6 - android:title="慧测慧练"  
7 - ></item> 4 + <!--<item android:id="@+id/menu_item_index"-->
  5 + <!--android:icon="@drawable/selector_ceping"-->
  6 + <!--android:title="慧测慧练"-->
  7 + <!--&gt;</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
16 <item android:id="@+id/menu_item_report" 16 <item android:id="@+id/menu_item_report"
17 android:icon="@drawable/selector_report" 17 android:icon="@drawable/selector_report"
18 - android:title="报告" 18 + android:title="成长"
19 ></item> 19 ></item>
20 20
21 21
22 <item android:id="@+id/menu_item_mine" 22 <item android:id="@+id/menu_item_mine"
23 android:icon="@drawable/selector_ceping" 23 android:icon="@drawable/selector_ceping"
24 - android:title="个人中心" 24 + android:title="我的"
25 ></item> 25 ></item>
26 26
27 </menu> 27 </menu>
28 \ No newline at end of file 28 \ No newline at end of file
app/src/main/res/values/colors.xml
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <color name="hintTextColor">#494947</color> 8 <color name="hintTextColor">#494947</color>
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 +
12 <color name="back_top">#A6DAFF</color> 12 <color name="back_top">#A6DAFF</color>
13 <color name="textBlue">#ACC9FC</color> 13 <color name="textBlue">#ACC9FC</color>
14 <color name="titleColor">#A6DAFF</color> 14 <color name="titleColor">#A6DAFF</color>
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
19 <color name="huodong_blue">#ACD1FB</color> 19 <color name="huodong_blue">#ACD1FB</color>
20 <color name="text_color">#757575</color> 20 <color name="text_color">#757575</color>
21 <color name="textGreen">#5FB762</color> 21 <color name="textGreen">#5FB762</color>
  22 + <color name="textRed">#FC5B6A</color>
22 <color name="transparent">#00000000</color> 23 <color name="transparent">#00000000</color>
23 <color name="deyu_textColor">#60b3f6</color> 24 <color name="deyu_textColor">#60b3f6</color>
24 <color name="deyu_BlueColor">#2b71c4</color> 25 <color name="deyu_BlueColor">#2b71c4</color>
app/src/main/res/values/strings.xml
@@ -5,6 +5,6 @@ @@ -5,6 +5,6 @@
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>
app/src/main/res/xml/filepaths.xml 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<path>
  3 + <external-path path="download/" name="files_path"/>
  4 +</path>
0 \ No newline at end of file 5 \ No newline at end of file
mvpsdk/src/main/java/com/share/mvpsdk/view/MyVieoView.java 0 → 100644
@@ -0,0 +1,115 @@ @@ -0,0 +1,115 @@
  1 +package com.share.mvpsdk.view;
  2 +
  3 +import android.content.Context;
  4 +import android.media.MediaMetadataRetriever;
  5 +import android.media.MediaPlayer;
  6 +import android.net.Uri;
  7 +import android.text.TextUtils;
  8 +import android.util.AttributeSet;
  9 +import android.util.Log;
  10 +import android.widget.MediaController;
  11 +import android.widget.VideoView;
  12 +
  13 +/**
  14 + * Created by ToaHanDong on 2018/4/10.
  15 + */
  16 +
  17 +public class MyVieoView extends VideoView {
  18 +
  19 + private Context mContext = null;
  20 +
  21 + //最终的视频资源宽度
  22 + private int mVideoWidth = 480;
  23 +
  24 + //最终视频资源高度
  25 + private int mVideoHeight = 480;
  26 +
  27 + //视频资源原始宽度
  28 + private int videoRealW = 1;
  29 +
  30 + //视频资源原始高度
  31 + private int videoRealH = 1;
  32 +
  33 + private String url = "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4";
  34 +
  35 + public MyVieoView(Context context) {
  36 + super(context);
  37 + mContext = context;
  38 + }
  39 +
  40 + public MyVieoView(Context context, AttributeSet attrs) {
  41 + super(context, attrs);
  42 + mContext = context;
  43 + }
  44 +
  45 + public MyVieoView(Context context, AttributeSet attrs, int defStyleAttr) {
  46 + super(context, attrs, defStyleAttr);
  47 + mContext = context;
  48 + }
  49 +
  50 + public void setVideoPath(String urlPath) {
  51 +
  52 +// if (TextUtils.isEmpty(urlPath)) urlPath = url;
  53 + setVideoURI(Uri.parse(urlPath));
  54 + //创建视频播放时的控制器,这个控制器可以自定义。此处是默认的实现
  55 + setMediaController(null);
  56 + //请求焦点
  57 + requestFocus();
  58 + //设置播放监听
  59 + setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
  60 + @Override
  61 + public void onPrepared(MediaPlayer mediaPlayer) {
  62 + // optional need Vitamio 4.0
  63 + //设置重放速度
  64 +// mediaPlayer.setPlaybackSpeed(1.0f);
  65 + }
  66 + });
  67 + //加载结束后开始播放,这行代码可以控制视频的播放。
  68 + start();
  69 +
  70 + }
  71 +
  72 +
  73 + @Override
  74 + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
  75 + int width = getDefaultSize(0, widthMeasureSpec);
  76 + int height = getDefaultSize(0, heightMeasureSpec);
  77 + if (height > width) {
  78 + //竖屏
  79 + if (videoRealH > videoRealW) {
  80 + //如果视频资源是竖屏
  81 + //占满屏幕
  82 + mVideoHeight = height;
  83 + mVideoWidth = width;
  84 + } else {
  85 + //如果视频资源是横屏
  86 + //宽度占满,高度保存比例
  87 + mVideoWidth = width;
  88 + float r = videoRealH / (float) videoRealW;
  89 +// mVideoHeight = (int) (mVideoWidth * r);
  90 + mVideoHeight=height;
  91 + }
  92 + } else {
  93 + //横屏
  94 + if (videoRealH > videoRealW) {
  95 + //如果视频资源是竖屏
  96 + //宽度占满,高度保存比例
  97 + mVideoHeight = height;
  98 + float r = videoRealW / (float) videoRealH;
  99 + mVideoWidth = (int) (mVideoHeight * r);
  100 + } else {
  101 + //如果视频资源是横屏
  102 + //占满屏幕
  103 + mVideoHeight = height;
  104 + mVideoWidth = width;
  105 + }
  106 + }
  107 + setMeasuredDimension(mVideoWidth, mVideoHeight);
  108 +// if (videoRealH == videoRealW && videoRealH == 1) {
  109 +// //没能获取到视频真实的宽高,自适应就可以了,什么也不用做
  110 +// super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  111 +// } else {
  112 +// setMeasuredDimension(mVideoWidth, mVideoHeight);
  113 +// }
  114 + }
  115 +}