Commit f8c93dceef5b4abaa3d85e191499a437fc156b2b
Exists in
yxb_dev
and in
2 other branches
Merge branch 'developer' into yxb_dev
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
| @@ -19,6 +19,7 @@ import android.widget.TextView; | @@ -19,6 +19,7 @@ import android.widget.TextView; | ||
| 19 | import com.jcodecraeer.xrecyclerview.XRecyclerView; | 19 | import com.jcodecraeer.xrecyclerview.XRecyclerView; |
| 20 | import com.share.mvpsdk.base.BasePresenter; | 20 | import com.share.mvpsdk.base.BasePresenter; |
| 21 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | 21 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| 22 | +import com.share.mvpsdk.utils.ToastUtils; | ||
| 22 | import com.shunzhi.parent.AppConfig; | 23 | import com.shunzhi.parent.AppConfig; |
| 23 | import com.shunzhi.parent.AppContext; | 24 | import com.shunzhi.parent.AppContext; |
| 24 | import com.shunzhi.parent.R; | 25 | import com.shunzhi.parent.R; |
| @@ -62,7 +63,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -62,7 +63,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 62 | 63 | ||
| 63 | TextView tvLocalAddress; | 64 | TextView tvLocalAddress; |
| 64 | 65 | ||
| 65 | - LinearLayout layout_control; | 66 | + LinearLayout layout_control,layout_consult; |
| 66 | 67 | ||
| 67 | CityPicker cityPicker = null; | 68 | CityPicker cityPicker = null; |
| 68 | 69 | ||
| @@ -71,6 +72,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -71,6 +72,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 71 | int pageIndex = 1; | 72 | int pageIndex = 1; |
| 72 | boolean first = true; | 73 | boolean first = true; |
| 73 | 74 | ||
| 75 | + NestedScrollView nesteScrollView; | ||
| 76 | + | ||
| 74 | @Override | 77 | @Override |
| 75 | public int getLayoutId() { | 78 | public int getLayoutId() { |
| 76 | return R.layout.fragment_zi_xun; | 79 | return R.layout.fragment_zi_xun; |
| @@ -82,8 +85,10 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -82,8 +85,10 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 82 | recycler_context = view.findViewById(R.id.recycler_content); | 85 | recycler_context = view.findViewById(R.id.recycler_content); |
| 83 | initRecycler(); | 86 | initRecycler(); |
| 84 | 87 | ||
| 88 | + nesteScrollView=view.findViewById(R.id.nesteScrollView); | ||
| 85 | ivSearch = view.findViewById(R.id.ivSearch); | 89 | ivSearch = view.findViewById(R.id.ivSearch); |
| 86 | xBanner = view.findViewById(R.id.xBanner); | 90 | xBanner = view.findViewById(R.id.xBanner); |
| 91 | + layout_consult=view.findViewById(R.id.layout_consult); | ||
| 87 | videoplayer = view.findViewById(R.id.videoplayer); | 92 | videoplayer = view.findViewById(R.id.videoplayer); |
| 88 | tvLocalAddress = view.findViewById(R.id.tvLocalAddress); | 93 | tvLocalAddress = view.findViewById(R.id.tvLocalAddress); |
| 89 | layout_control = view.findViewById(R.id.layout_control); | 94 | layout_control = view.findViewById(R.id.layout_control); |
| @@ -98,6 +103,13 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -98,6 +103,13 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 98 | initBroadCast(); | 103 | initBroadCast(); |
| 99 | 104 | ||
| 100 | initListeners(); | 105 | initListeners(); |
| 106 | + layout_consult.measure(0,0); | ||
| 107 | + nesteScrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() { | ||
| 108 | + @Override | ||
| 109 | + public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { | ||
| 110 | + ToastUtils.showToast("scrollX="+nesteScrollView.getMeasuredHeight()+"scrollY="+scrollY+"oldScrollX="+oldScrollX+"oldScrollY="+oldScrollY+"layout_consult="+layout_consult.getMeasuredHeight()); | ||
| 111 | + } | ||
| 112 | + }); | ||
| 101 | } | 113 | } |
| 102 | 114 | ||
| 103 | private void initRecycler() { | 115 | private void initRecycler() { |
app/src/main/res/layout/fragment_zi_xun.xml
| @@ -14,6 +14,7 @@ | @@ -14,6 +14,7 @@ | ||
| 14 | android:layout_height="match_parent"> | 14 | android:layout_height="match_parent"> |
| 15 | 15 | ||
| 16 | <LinearLayout | 16 | <LinearLayout |
| 17 | + android:id="@+id/layout_consult" | ||
| 17 | android:layout_width="match_parent" | 18 | android:layout_width="match_parent" |
| 18 | android:layout_height="match_parent" | 19 | android:layout_height="match_parent" |
| 19 | android:orientation="vertical"> | 20 | android:orientation="vertical"> |