Commit f552dcacf2f56ac4ccaafeb2803aa7922dea8b4b
1 parent
3163a156
Exists in
yxb_dev
and in
2 other branches
no message
Showing
6 changed files
with
52 additions
and
26 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/presenter/ceping/CePingPresenter.java
1 | package com.shunzhi.parent.presenter.ceping; | 1 | package com.shunzhi.parent.presenter.ceping; |
2 | 2 | ||
3 | -import android.content.res.TypedArray; | ||
4 | -import android.util.TypedValue; | ||
5 | import android.view.View; | 3 | import android.view.View; |
6 | import android.widget.LinearLayout; | 4 | import android.widget.LinearLayout; |
7 | 5 | ||
@@ -27,11 +25,6 @@ public class CePingPresenter extends CepingContract.CePingPresenter { | @@ -27,11 +25,6 @@ public class CePingPresenter extends CepingContract.CePingPresenter { | ||
27 | toolBeanList.add(new ToolBean(R.drawable.zycx+"","专业查询")); | 25 | toolBeanList.add(new ToolBean(R.drawable.zycx+"","专业查询")); |
28 | toolBeanList.add(new ToolBean(R.drawable.cmyk+"","传媒艺考")); | 26 | toolBeanList.add(new ToolBean(R.drawable.cmyk+"","传媒艺考")); |
29 | toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜")); | 27 | toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜")); |
30 | - toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜")); | ||
31 | - toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜")); | ||
32 | - toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜")); | ||
33 | - toolBeanList.add(new ToolBean(R.drawable.phb+"","排行榜")); | ||
34 | - | ||
35 | for (int i = 0; i < toolBeanList.size(); i++) { | 28 | for (int i = 0; i < toolBeanList.size(); i++) { |
36 | TextAndImgShowView textAndImgShowView=new TextAndImgShowView(mIView.getBindActivity()); | 29 | TextAndImgShowView textAndImgShowView=new TextAndImgShowView(mIView.getBindActivity()); |
37 | textAndImgShowView.setTextColor(R.color.textColor); | 30 | textAndImgShowView.setTextColor(R.color.textColor); |
app/src/main/java/com/shunzhi/parent/ui/activity/binding/SelectSchoolActivity.java
@@ -27,12 +27,15 @@ import java.util.Collections; | @@ -27,12 +27,15 @@ import java.util.Collections; | ||
27 | import java.util.Comparator; | 27 | import java.util.Comparator; |
28 | import java.util.List; | 28 | import java.util.List; |
29 | 29 | ||
30 | +import me.leefeng.citypicker.CityPicker; | ||
31 | +import me.leefeng.citypicker.CityPickerListener; | ||
32 | + | ||
30 | /** | 33 | /** |
31 | * Created by Administrator on 2018/3/12 0012. | 34 | * Created by Administrator on 2018/3/12 0012. |
32 | */ | 35 | */ |
33 | 36 | ||
34 | public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContract.SchoolListPrasenter, SchoolListContract.ISchoolListModel> implements | 37 | public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContract.SchoolListPrasenter, SchoolListContract.ISchoolListModel> implements |
35 | - View.OnClickListener, SchoolListContract.ISchoolListView { | 38 | + View.OnClickListener, SchoolListContract.ISchoolListView,CityPickerListener { |
36 | 39 | ||
37 | private SideBar sideBar; | 40 | private SideBar sideBar; |
38 | private TextView dialog, go_next, tvLocalAddress; | 41 | private TextView dialog, go_next, tvLocalAddress; |
@@ -40,6 +43,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | @@ -40,6 +43,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
40 | private List<String> list = new ArrayList<>(); | 43 | private List<String> list = new ArrayList<>(); |
41 | SchoolListAdapter schoolListAdapter; | 44 | SchoolListAdapter schoolListAdapter; |
42 | 45 | ||
46 | + CityPicker cityPicker=null; | ||
43 | @NonNull | 47 | @NonNull |
44 | @Override | 48 | @Override |
45 | public BasePresenter initPresenter() { | 49 | public BasePresenter initPresenter() { |
@@ -53,6 +57,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | @@ -53,6 +57,7 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
53 | go_next = findViewById(R.id.go_next); | 57 | go_next = findViewById(R.id.go_next); |
54 | go_next.setOnClickListener(this); | 58 | go_next.setOnClickListener(this); |
55 | tvLocalAddress = findViewById(R.id.tvLocalAddress); | 59 | tvLocalAddress = findViewById(R.id.tvLocalAddress); |
60 | + tvLocalAddress.setOnClickListener(this); | ||
56 | tvLocalAddress.setText(AppContext.getInstance().cityName); | 61 | tvLocalAddress.setText(AppContext.getInstance().cityName); |
57 | setSchoolList(); | 62 | setSchoolList(); |
58 | 63 | ||
@@ -159,6 +164,10 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | @@ -159,6 +164,10 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
159 | } else { | 164 | } else { |
160 | ToastUtils.showToast("请选择学校"); | 165 | ToastUtils.showToast("请选择学校"); |
161 | } | 166 | } |
167 | + }else if (v==tvLocalAddress){ | ||
168 | + if (null==cityPicker)cityPicker=new CityPicker(SelectSchoolActivity.this,this); | ||
169 | + if (cityPicker.isShow())cityPicker.close(); | ||
170 | + else cityPicker.show(); | ||
162 | } | 171 | } |
163 | 172 | ||
164 | } | 173 | } |
@@ -224,4 +233,15 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | @@ -224,4 +233,15 @@ public class SelectSchoolActivity extends BaseMVPCompatActivity<SchoolListContra | ||
224 | schoolListAdapter.addAll(schoolList); | 233 | schoolListAdapter.addAll(schoolList); |
225 | schoollist.setAdapter(schoolListAdapter); | 234 | schoollist.setAdapter(schoolListAdapter); |
226 | } | 235 | } |
236 | + | ||
237 | + @Override | ||
238 | + protected void onDestroy() { | ||
239 | + super.onDestroy(); | ||
240 | + if (null!=cityPicker)cityPicker.cancle(); | ||
241 | + } | ||
242 | + | ||
243 | + @Override | ||
244 | + public void getCity(String name) { | ||
245 | + | ||
246 | + } | ||
227 | } | 247 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/CePingFragment.java
@@ -24,9 +24,12 @@ import com.shunzhi.parent.contract.ceping.CepingContract; | @@ -24,9 +24,12 @@ import com.shunzhi.parent.contract.ceping.CepingContract; | ||
24 | import com.shunzhi.parent.presenter.ceping.CePingPresenter; | 24 | import com.shunzhi.parent.presenter.ceping.CePingPresenter; |
25 | import com.shunzhi.parent.views.TextAndImgShowView; | 25 | import com.shunzhi.parent.views.TextAndImgShowView; |
26 | 26 | ||
27 | +import me.leefeng.citypicker.CityPicker; | ||
28 | +import me.leefeng.citypicker.CityPickerListener; | ||
29 | + | ||
27 | 30 | ||
28 | public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingPresenter,CepingContract.ICePingModel> implements CepingContract.ICePingView | 31 | public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingPresenter,CepingContract.ICePingModel> implements CepingContract.ICePingView |
29 | - ,View.OnClickListener{ | 32 | + ,View.OnClickListener,CityPickerListener{ |
30 | 33 | ||
31 | TextView tvLocalAddress; | 34 | TextView tvLocalAddress; |
32 | 35 | ||
@@ -40,6 +43,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -40,6 +43,8 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
40 | 43 | ||
41 | LinearLayout layout_control; | 44 | LinearLayout layout_control; |
42 | 45 | ||
46 | + CityPicker cityPicker=null; | ||
47 | + | ||
43 | @Override | 48 | @Override |
44 | public int getLayoutId() { | 49 | public int getLayoutId() { |
45 | return R.layout.fragment_ce_ping; | 50 | return R.layout.fragment_ce_ping; |
@@ -122,6 +127,9 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -122,6 +127,9 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
122 | break; | 127 | break; |
123 | case R.id.tvLocalAddress: | 128 | case R.id.tvLocalAddress: |
124 | AppContext.getInstance().startLocation(); | 129 | AppContext.getInstance().startLocation(); |
130 | + if (null==cityPicker)cityPicker=new CityPicker(getActivity(),this); | ||
131 | + if (cityPicker.isShow())cityPicker.close(); | ||
132 | + else cityPicker.show(); | ||
125 | break; | 133 | break; |
126 | case R.id.ivCamera: | 134 | case R.id.ivCamera: |
127 | ToastUtils.showToast("功能暂未上线"); | 135 | ToastUtils.showToast("功能暂未上线"); |
@@ -142,10 +150,16 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | @@ -142,10 +150,16 @@ public class CePingFragment extends BaseMVPCompatFragment<CepingContract.CePingP | ||
142 | public void onDestroy() { | 150 | public void onDestroy() { |
143 | super.onDestroy(); | 151 | super.onDestroy(); |
144 | if (null!=broadcastReceiver)getActivity().unregisterReceiver(broadcastReceiver); | 152 | if (null!=broadcastReceiver)getActivity().unregisterReceiver(broadcastReceiver); |
153 | + if (null!=cityPicker)cityPicker.cancle(); | ||
145 | } | 154 | } |
146 | 155 | ||
147 | @Override | 156 | @Override |
148 | public void getTools() { | 157 | public void getTools() { |
149 | 158 | ||
150 | } | 159 | } |
160 | + | ||
161 | + @Override | ||
162 | + public void getCity(String name) { | ||
163 | + ToastUtils.showToast(name); | ||
164 | + } | ||
151 | } | 165 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
@@ -33,9 +33,11 @@ import java.util.ArrayList; | @@ -33,9 +33,11 @@ import java.util.ArrayList; | ||
33 | import java.util.List; | 33 | import java.util.List; |
34 | 34 | ||
35 | import cn.jzvd.JZVideoPlayerStandard; | 35 | import cn.jzvd.JZVideoPlayerStandard; |
36 | +import me.leefeng.citypicker.CityPicker; | ||
37 | +import me.leefeng.citypicker.CityPickerListener; | ||
36 | 38 | ||
37 | public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter,ConsultContract.IConsultModel> implements View.OnClickListener | 39 | public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter,ConsultContract.IConsultModel> implements View.OnClickListener |
38 | -,ConsultContract.IConsultView{ | 40 | +,ConsultContract.IConsultView,CityPickerListener{ |
39 | 41 | ||
40 | ImageView ivSearch; | 42 | ImageView ivSearch; |
41 | 43 | ||
@@ -48,6 +50,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -48,6 +50,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
48 | TextView tvLocalAddress; | 50 | TextView tvLocalAddress; |
49 | 51 | ||
50 | LinearLayout layout_control; | 52 | LinearLayout layout_control; |
53 | + | ||
54 | + CityPicker cityPicker=null; | ||
51 | @Override | 55 | @Override |
52 | public int getLayoutId() { | 56 | public int getLayoutId() { |
53 | return R.layout.fragment_zi_xun; | 57 | return R.layout.fragment_zi_xun; |
@@ -136,6 +140,9 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -136,6 +140,9 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
136 | switch (view.getId()) { | 140 | switch (view.getId()) { |
137 | case R.id.tvLocalAddress: | 141 | case R.id.tvLocalAddress: |
138 | AppContext.getInstance().startLocation(); | 142 | AppContext.getInstance().startLocation(); |
143 | + if (null==cityPicker)cityPicker=new CityPicker(getActivity(),this); | ||
144 | + if (cityPicker.isShow())cityPicker.close(); | ||
145 | + else cityPicker.show(); | ||
139 | break; | 146 | break; |
140 | case R.id.ivSearch://搜索按钮 | 147 | case R.id.ivSearch://搜索按钮 |
141 | 148 | ||
@@ -165,10 +172,16 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -165,10 +172,16 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
165 | public void onDestroy() { | 172 | public void onDestroy() { |
166 | super.onDestroy(); | 173 | super.onDestroy(); |
167 | if (null!=broadcastReceiver)getActivity().unregisterReceiver(broadcastReceiver); | 174 | if (null!=broadcastReceiver)getActivity().unregisterReceiver(broadcastReceiver); |
175 | + if (null!=cityPicker)cityPicker.cancle(); | ||
168 | } | 176 | } |
169 | 177 | ||
170 | @Override | 178 | @Override |
171 | public void showTools() { | 179 | public void showTools() { |
172 | 180 | ||
173 | } | 181 | } |
182 | + | ||
183 | + @Override | ||
184 | + public void getCity(String name) { | ||
185 | + | ||
186 | + } | ||
174 | } | 187 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultOneLevelFragment.java
1 | package com.shunzhi.parent.ui.fragment.consult; | 1 | package com.shunzhi.parent.ui.fragment.consult; |
2 | 2 | ||
3 | -import android.content.Context; | ||
4 | -import android.net.Uri; | ||
5 | import android.os.Bundle; | 3 | import android.os.Bundle; |
6 | import android.support.annotation.NonNull; | 4 | import android.support.annotation.NonNull; |
7 | import android.support.annotation.Nullable; | 5 | import android.support.annotation.Nullable; |
8 | -import android.support.design.widget.TabLayout; | ||
9 | -import android.support.v4.app.Fragment; | ||
10 | import android.support.v7.widget.LinearLayoutManager; | 6 | import android.support.v7.widget.LinearLayoutManager; |
11 | import android.support.v7.widget.RecyclerView; | 7 | import android.support.v7.widget.RecyclerView; |
12 | import android.util.Log; | 8 | import android.util.Log; |
@@ -18,27 +14,17 @@ import android.widget.ImageView; | @@ -18,27 +14,17 @@ import android.widget.ImageView; | ||
18 | import android.widget.LinearLayout; | 14 | import android.widget.LinearLayout; |
19 | import android.widget.TextView; | 15 | import android.widget.TextView; |
20 | 16 | ||
21 | -import com.bumptech.glide.Glide; | ||
22 | import com.share.mvpsdk.base.BasePresenter; | 17 | import com.share.mvpsdk.base.BasePresenter; |
23 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | 18 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
24 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | 19 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
25 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | 20 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
26 | import com.share.mvpsdk.utils.DisplayUtils; | 21 | import com.share.mvpsdk.utils.DisplayUtils; |
27 | -import com.share.mvpsdk.utils.ToastUtils; | ||
28 | -import com.shunzhi.parent.AppContext; | ||
29 | import com.shunzhi.parent.R; | 22 | import com.shunzhi.parent.R; |
30 | import com.shunzhi.parent.adapter.MyConsultAdapter; | 23 | import com.shunzhi.parent.adapter.MyConsultAdapter; |
31 | import com.shunzhi.parent.bean.GrallyBean; | 24 | import com.shunzhi.parent.bean.GrallyBean; |
32 | import com.shunzhi.parent.bean.MyConsultBean; | 25 | import com.shunzhi.parent.bean.MyConsultBean; |
33 | -import com.shunzhi.parent.contract.consult.ConsultContract; | ||
34 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; | 26 | import com.shunzhi.parent.contract.consult.consultone.ConsultOneContract; |
35 | import com.shunzhi.parent.presenter.consult.consultone.ConsultOnePresenter; | 27 | import com.shunzhi.parent.presenter.consult.consultone.ConsultOnePresenter; |
36 | -import com.shunzhi.parent.ui.activity.consult.ConsultTwoLevelActivity; | ||
37 | -import com.shunzhi.parent.views.TextAndImgShowView; | ||
38 | - | ||
39 | -import java.io.ByteArrayOutputStream; | ||
40 | -import java.io.IOException; | ||
41 | -import java.io.InputStream; | ||
42 | import java.util.ArrayList; | 28 | import java.util.ArrayList; |
43 | import java.util.List; | 29 | import java.util.List; |
44 | 30 |
app/src/main/res/layout/layout_textandimgshow.xml
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | android:orientation="horizontal" | 21 | android:orientation="horizontal" |
22 | android:padding="@dimen/size_dp_10"> | 22 | android:padding="@dimen/size_dp_10"> |
23 | 23 | ||
24 | - <LinearLayout | 24 | + <!-- <LinearLayout |
25 | android:visibility="gone" | 25 | android:visibility="gone" |
26 | android:layout_width="wrap_content" | 26 | android:layout_width="wrap_content" |
27 | android:layout_height="wrap_content" | 27 | android:layout_height="wrap_content" |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | android:background="?android:selectableItemBackground"> | 62 | android:background="?android:selectableItemBackground"> |
63 | 63 | ||
64 | </com.shunzhi.parent.views.TextAndImgShowView> | 64 | </com.shunzhi.parent.views.TextAndImgShowView> |
65 | - </LinearLayout> | 65 | + </LinearLayout>--> |
66 | </LinearLayout> | 66 | </LinearLayout> |
67 | </HorizontalScrollView> | 67 | </HorizontalScrollView> |
68 | </android.support.design.widget.CoordinatorLayout> | 68 | </android.support.design.widget.CoordinatorLayout> |
69 | \ No newline at end of file | 69 | \ No newline at end of file |