Commit 935f129cf1a7e76c7ef8ed3b48c1956a698fcdfc
1 parent
0f4158c7
Exists in
yxb_dev
and in
2 other branches
no message
Showing
4 changed files
with
7 additions
and
9 deletions
Show diff stats
app/src/main/AndroidManifest.xml
| @@ -173,7 +173,6 @@ | @@ -173,7 +173,6 @@ | ||
| 173 | 173 | ||
| 174 | <activity | 174 | <activity |
| 175 | android:name=".ui.activity.mywebview.WebViewActivity" | 175 | android:name=".ui.activity.mywebview.WebViewActivity" |
| 176 | - android:launchMode="singleInstance" | ||
| 177 | android:screenOrientation="portrait" /> | 176 | android:screenOrientation="portrait" /> |
| 178 | 177 | ||
| 179 | <activity android:name=".ui.activity.consult.ConsultTwoLevelActivity" | 178 | <activity android:name=".ui.activity.consult.ConsultTwoLevelActivity" |
app/src/main/java/com/shunzhi/parent/ui/activity/mywebview/WebViewActivity.java
| @@ -19,7 +19,6 @@ import android.widget.TextView; | @@ -19,7 +19,6 @@ import android.widget.TextView; | ||
| 19 | import com.share.mvpsdk.base.activity.BaseCompatActivity; | 19 | import com.share.mvpsdk.base.activity.BaseCompatActivity; |
| 20 | import com.share.mvpsdk.utils.AppUtils; | 20 | import com.share.mvpsdk.utils.AppUtils; |
| 21 | import com.share.mvpsdk.utils.NetworkConnectionUtils; | 21 | import com.share.mvpsdk.utils.NetworkConnectionUtils; |
| 22 | -import com.share.mvpsdk.utils.ToastUtils; | ||
| 23 | import com.share.mvpsdk.widgets.NestedScrollWebView; | 22 | import com.share.mvpsdk.widgets.NestedScrollWebView; |
| 24 | import com.shunzhi.parent.AppConfig; | 23 | import com.shunzhi.parent.AppConfig; |
| 25 | import com.shunzhi.parent.R; | 24 | import com.shunzhi.parent.R; |
| @@ -40,7 +39,6 @@ public class WebViewActivity extends BaseCompatActivity { | @@ -40,7 +39,6 @@ public class WebViewActivity extends BaseCompatActivity { | ||
| 40 | Intent intent = new Intent(context, WebViewActivity.class); | 39 | Intent intent = new Intent(context, WebViewActivity.class); |
| 41 | intent.putExtra("url", url); | 40 | intent.putExtra("url", url); |
| 42 | intent.putExtra("type", type); | 41 | intent.putExtra("type", type); |
| 43 | - intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | ||
| 44 | context.startActivity(intent); | 42 | context.startActivity(intent); |
| 45 | } | 43 | } |
| 46 | 44 |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
| @@ -15,7 +15,6 @@ import android.widget.ImageView; | @@ -15,7 +15,6 @@ import android.widget.ImageView; | ||
| 15 | import android.widget.LinearLayout; | 15 | import android.widget.LinearLayout; |
| 16 | import android.widget.TextView; | 16 | import android.widget.TextView; |
| 17 | 17 | ||
| 18 | -import com.bumptech.glide.Glide; | ||
| 19 | import com.jcodecraeer.xrecyclerview.XRecyclerView; | 18 | import com.jcodecraeer.xrecyclerview.XRecyclerView; |
| 20 | import com.share.mvpsdk.base.BasePresenter; | 19 | import com.share.mvpsdk.base.BasePresenter; |
| 21 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; | 20 | import com.share.mvpsdk.base.fragment.BaseMVPCompatFragment; |
| @@ -55,6 +54,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -55,6 +54,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 55 | 54 | ||
| 56 | List<String> imgesUrl = new ArrayList<>(); | 55 | List<String> imgesUrl = new ArrayList<>(); |
| 57 | List<String> describeList = new ArrayList<>(); | 56 | List<String> describeList = new ArrayList<>(); |
| 57 | + List<GuangGaoBean> guanggaoList = new ArrayList<>(); | ||
| 58 | List<ChannelContextBean> contextList = new ArrayList<>(); | 58 | List<ChannelContextBean> contextList = new ArrayList<>(); |
| 59 | 59 | ||
| 60 | JZVideoPlayerStandard videoplayer; | 60 | JZVideoPlayerStandard videoplayer; |
| @@ -140,7 +140,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -140,7 +140,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 140 | xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() { | 140 | xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() { |
| 141 | @Override | 141 | @Override |
| 142 | public void onItemClick(XBanner banner, int position) { | 142 | public void onItemClick(XBanner banner, int position) { |
| 143 | - WebViewActivity.getInstance(getContext(), describeList.get(position), -1); | 143 | + WebViewActivity.getInstance(getContext(), guanggaoList.get(position).url, -1); |
| 144 | } | 144 | } |
| 145 | }); | 145 | }); |
| 146 | 146 | ||
| @@ -215,6 +215,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -215,6 +215,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
| 215 | public void showBanners(List<GuangGaoBean> guangGaoBeanList) { | 215 | public void showBanners(List<GuangGaoBean> guangGaoBeanList) { |
| 216 | describeList.clear(); | 216 | describeList.clear(); |
| 217 | imgesUrl.clear(); | 217 | imgesUrl.clear(); |
| 218 | + guanggaoList=guangGaoBeanList; | ||
| 218 | for (int i = 0; i < guangGaoBeanList.size(); i++) { | 219 | for (int i = 0; i < guangGaoBeanList.size(); i++) { |
| 219 | imgesUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); | 220 | imgesUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); |
| 220 | describeList.add(guangGaoBeanList.get(i).describe); | 221 | describeList.add(guangGaoBeanList.get(i).describe); |
app/src/main/java/com/shunzhi/parent/ui/fragment/consult/ConsultOneLevelFragment.java
| @@ -6,7 +6,6 @@ import android.support.annotation.Nullable; | @@ -6,7 +6,6 @@ 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; | ||
| 10 | import android.view.LayoutInflater; | 9 | import android.view.LayoutInflater; |
| 11 | import android.view.View; | 10 | import android.view.View; |
| 12 | import android.view.ViewGroup; | 11 | import android.view.ViewGroup; |
| @@ -97,7 +96,7 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | @@ -97,7 +96,7 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
| 97 | pageIndex = 1; | 96 | pageIndex = 1; |
| 98 | mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, pageIndex); | 97 | mPresenter.getConsultContent(AppContext.getInstance().district, Integer.parseInt(channel), 0, pageIndex); |
| 99 | 98 | ||
| 100 | - mPresenter.getBanners("4", AppContext.getInstance().district); | 99 | + mPresenter.getBanners("3", AppContext.getInstance().district); |
| 101 | 100 | ||
| 102 | } | 101 | } |
| 103 | 102 | ||
| @@ -223,13 +222,14 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | @@ -223,13 +222,14 @@ public class ConsultOneLevelFragment extends BaseMVPCompatFragment<ConsultOneCon | ||
| 223 | } | 222 | } |
| 224 | 223 | ||
| 225 | @Override | 224 | @Override |
| 226 | - public void onBindViewHolder(final GuangGaoBean object, int position) { | 225 | + public void onBindViewHolder(final GuangGaoBean object, final int position) { |
| 227 | GlideUtils.showImg(mContext, iv_grally, object.fileSrc); | 226 | GlideUtils.showImg(mContext, iv_grally, object.fileSrc); |
| 228 | tv_grally_title.setText(object.describe + ""); | 227 | tv_grally_title.setText(object.describe + ""); |
| 229 | iv_grally.setOnClickListener(new View.OnClickListener() { | 228 | iv_grally.setOnClickListener(new View.OnClickListener() { |
| 230 | @Override | 229 | @Override |
| 231 | public void onClick(View v) { | 230 | public void onClick(View v) { |
| 232 | - WebViewActivity.getInstance(mContext, object.url, -1); | 231 | +// WebViewActivity.getInstance(mContext, object.url, -1); |
| 232 | + WebViewActivity.getInstance(getActivity(), object.url, -1); | ||
| 233 | } | 233 | } |
| 234 | }); | 234 | }); |
| 235 | } | 235 | } |