Commit 4b52df2364043d395fd6941899a0153ade052f08

Authored by 陶汉栋
1 parent 0abe9fd6

no message

app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
@@ -113,7 +113,6 @@ public class MessageManager { @@ -113,7 +113,6 @@ public class MessageManager {
113 notifyNotification(uuid, id, "收到一条作业通知"); 113 notifyNotification(uuid, id, "收到一条作业通知");
114 } 114 }
115 115
116 -  
117 } catch (JSONException e) { 116 } catch (JSONException e) {
118 e.printStackTrace(); 117 e.printStackTrace();
119 } 118 }
app/src/main/java/com/shunzhi/parent/ui/MainActivity.java
@@ -104,6 +104,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. @@ -104,6 +104,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils.
104 else fragmentTransaction.hide(fragments[i]); 104 else fragmentTransaction.hide(fragments[i]);
105 } 105 }
106 if (index==CONSULT_INDEX)consultFragment.refresh(); 106 if (index==CONSULT_INDEX)consultFragment.refresh();
  107 + else if (index==CEPING_INDEX)cePingFragment.refresh();
107 fragmentTransaction.commit(); 108 fragmentTransaction.commit();
108 } 109 }
109 110
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
@@ -207,4 +207,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP @@ -207,4 +207,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP
207 tvCourse3.setTag(toolBeanList.get(2).toolUrl); 207 tvCourse3.setTag(toolBeanList.get(2).toolUrl);
208 } 208 }
209 } 209 }
  210 +
  211 + public void refresh(){
  212 + addTools(AppContext.getInstance().district);
  213 + }
210 } 214 }
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
@@ -71,7 +71,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu @@ -71,7 +71,6 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu
71 int pageIndex = 1; 71 int pageIndex = 1;
72 boolean first = true; 72 boolean first = true;
73 73
74 -  
75 @Override 74 @Override
76 public int getLayoutId() { 75 public int getLayoutId() {
77 return R.layout.fragment_zi_xun; 76 return R.layout.fragment_zi_xun;
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.os.Bundle; 3 import android.os.Bundle;
  4 +import android.os.Handler;
  5 +import android.os.Message;
4 import android.support.annotation.NonNull; 6 import android.support.annotation.NonNull;
5 import android.support.annotation.Nullable; 7 import android.support.annotation.Nullable;
6 import android.text.TextUtils; 8 import android.text.TextUtils;
@@ -26,6 +28,7 @@ import java.util.ArrayList; @@ -26,6 +28,7 @@ import java.util.ArrayList;
26 import java.util.List; 28 import java.util.List;
27 29
28 import cn.jzvd.JZVideoPlayerStandard; 30 import cn.jzvd.JZVideoPlayerStandard;
  31 +import timber.log.Timber;
29 32
30 public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> 33 public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel>
31 implements ConsultContract.IConsultView { 34 implements ConsultContract.IConsultView {
app/src/main/java/com/shunzhi/parent/views/TextAndImgShowView.java
@@ -76,7 +76,7 @@ public class TextAndImgShowView extends LinearLayout { @@ -76,7 +76,7 @@ public class TextAndImgShowView extends LinearLayout {
76 } 76 }
77 77
78 public void setTextColor(int color) { 78 public void setTextColor(int color) {
79 - text.setTextColor(color); 79 + text.setTextColor(getContext().getResources().getColor(color));
80 } 80 }
81 81
82 public void setWidth(Activity activity, View layout_control) { 82 public void setWidth(Activity activity, View layout_control) {
@@ -86,7 +86,7 @@ public class TextAndImgShowView extends LinearLayout { @@ -86,7 +86,7 @@ public class TextAndImgShowView extends LinearLayout {
86 DisplayUtils.dp2px(layout_control.getPaddingLeft() + layout_control.getPaddingRight() 86 DisplayUtils.dp2px(layout_control.getPaddingLeft() + layout_control.getPaddingRight()
87 )) / 4; 87 )) / 4;
88 layout.setLayoutParams(params); 88 layout.setLayoutParams(params);
89 - LayoutParams params1 = new LayoutParams(52,52); 89 + LayoutParams params1 = new LayoutParams(DisplayUtils.px2dp(110),DisplayUtils.px2dp(110));
90 image.setLayoutParams(params1); 90 image.setLayoutParams(params1);
91 } 91 }
92 } 92 }
app/src/main/res/drawable/shape_xueqing_radius25.xml 0 → 100644
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <corners android:radius="@dimen/size_dp_25"/>
  4 + <solid android:color="@color/xueqing_blue"/>
  5 +</shape>
0 \ No newline at end of file 6 \ No newline at end of file
app/src/main/res/layout/fragment_start.xml
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
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 android:background="@color/bgColor" 5 android:background="@color/bgColor"
  6 + xmlns:app="http://schemas.android.com/apk/res-auto"
6 tools:context="com.shunzhi.parent.ui.fragment.StartFragment"> 7 tools:context="com.shunzhi.parent.ui.fragment.StartFragment">
7 8
8 <com.stx.xhb.xbanner.XBanner 9 <com.stx.xhb.xbanner.XBanner
@@ -18,14 +19,14 @@ @@ -18,14 +19,14 @@
18 19
19 <TextView 20 <TextView
20 android:id="@+id/tvJump" 21 android:id="@+id/tvJump"
21 - android:layout_width="wrap_content"  
22 - android:layout_height="wrap_content" 22 + android:layout_width="@dimen/size_dp_50"
  23 + android:layout_height="@dimen/size_dp_50"
23 android:text="跳过" 24 android:text="跳过"
  25 + android:gravity="center"
24 android:textColor="@color/white" 26 android:textColor="@color/white"
25 - android:textSize="@dimen/size_dp_16"  
26 - android:padding="@dimen/size_dp_10" 27 + android:textSize="@dimen/size_dp_12"
27 android:layout_gravity="right" 28 android:layout_gravity="right"
28 android:layout_margin="@dimen/size_dp_10" 29 android:layout_margin="@dimen/size_dp_10"
29 - android:background="@drawable/shape_xueqing_radius8" 30 + android:background="@drawable/shape_xueqing_radius25"
30 /> 31 />
31 </FrameLayout> 32 </FrameLayout>
app/src/main/res/layout/text_and_img_show.xml
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 android:layout_height="wrap_content" 28 android:layout_height="wrap_content"
29 android:layout_marginTop="5dp" 29 android:layout_marginTop="5dp"
30 android:gravity="center" 30 android:gravity="center"
31 - android:textColor="@color/white" 31 + android:textColor="@color/textColor"
32 android:textSize="14dp"/> 32 android:textSize="14dp"/>
33 </LinearLayout> 33 </LinearLayout>
34 34