|
@@ -0,0 +1,540 @@
|
|
|
+//package org.telegram.onecric.ui.activity;
|
|
|
+//
|
|
|
+//import android.content.Context;
|
|
|
+//import android.content.Intent;
|
|
|
+//import android.text.SpannableStringBuilder;
|
|
|
+//import android.text.Spanned;
|
|
|
+//import android.text.TextUtils;
|
|
|
+//import android.text.style.ForegroundColorSpan;
|
|
|
+//import android.view.View;
|
|
|
+//import android.view.ViewGroup;
|
|
|
+//import android.webkit.WebSettings;
|
|
|
+//import android.webkit.WebView;
|
|
|
+//import android.widget.FrameLayout;
|
|
|
+//import android.widget.ImageView;
|
|
|
+//import android.widget.LinearLayout;
|
|
|
+//import android.widget.TextView;
|
|
|
+//
|
|
|
+//import androidx.fragment.app.Fragment;
|
|
|
+//import androidx.fragment.app.FragmentPagerAdapter;
|
|
|
+//import androidx.viewpager.widget.ViewPager;
|
|
|
+//
|
|
|
+//import com.alibaba.fastjson.JSONObject;
|
|
|
+//import com.google.android.material.tabs.TabLayout;
|
|
|
+//import com.lxj.xpopup.XPopup;
|
|
|
+//
|
|
|
+//import org.telegram.cricdit.base.BaseTabActivity;
|
|
|
+//import org.telegram.cricdit.utils.ToastUtil;
|
|
|
+//import org.telegram.cricdit.view.popup.ReportBottomPopup;
|
|
|
+//import org.telegram.messenger.R;
|
|
|
+//import org.telegram.messenger.UserConfig;
|
|
|
+//import org.telegram.onecric.config.HttpConstant;
|
|
|
+//import org.telegram.onecric.mvp.bean.CricketMatchBean;
|
|
|
+//import org.telegram.onecric.mvp.bean.SubscribeTypeBean;
|
|
|
+//import org.telegram.onecric.mvp.bean.UpdatesBean;
|
|
|
+//import org.telegram.onecric.mvp.presenter.CricketDetailPresenter;
|
|
|
+//import org.telegram.onecric.mvp.presenter.SubscribePresenter;
|
|
|
+//import org.telegram.onecric.mvp.view.CricketDetailView;
|
|
|
+//import org.telegram.onecric.net.ApiCallback;
|
|
|
+//import org.telegram.onecric.ui.fragment.CricketFantasyFragment;
|
|
|
+//import org.telegram.onecric.ui.fragment.CricketInfoFragment;
|
|
|
+//import org.telegram.onecric.ui.fragment.CricketLiveFragment;
|
|
|
+//import org.telegram.onecric.ui.fragment.CricketScorecardFragment;
|
|
|
+//import org.telegram.onecric.ui.fragment.CricketSquadFragment;
|
|
|
+//import org.telegram.onecric.utils.DialogUtil;
|
|
|
+//import org.telegram.onecric.utils.GlideUtil;
|
|
|
+//import org.telegram.onecric.utils.ShareUtil;
|
|
|
+//
|
|
|
+//import java.util.ArrayList;
|
|
|
+//import java.util.List;
|
|
|
+//
|
|
|
+///**
|
|
|
+// * 开发公司:东莞市梦幻科技有限公司
|
|
|
+// * 时间:2022/8/27
|
|
|
+// */
|
|
|
+//public class NewCricketDetailActivity extends BaseTabActivity<CricketDetailPresenter> implements CricketDetailView, View.OnClickListener {
|
|
|
+//
|
|
|
+// private boolean isNotification;
|
|
|
+// private ImageView subscribeIv;
|
|
|
+//
|
|
|
+//
|
|
|
+// public static void forward(Context context, int matchId) {
|
|
|
+// Intent intent = new Intent(context, NewCricketDetailActivity.class);
|
|
|
+// intent.putExtra("matchId", matchId);
|
|
|
+// context.startActivity(intent);
|
|
|
+// }
|
|
|
+//
|
|
|
+// private int mMatchId;
|
|
|
+// private FrameLayout mFlWebview1;
|
|
|
+// private WebView mWvAnimation;
|
|
|
+// private FrameLayout mFlWebview2;
|
|
|
+// private WebView mWvVideo;
|
|
|
+// private LinearLayout ll_content;
|
|
|
+// //已开始
|
|
|
+// private ViewGroup cl_one;
|
|
|
+// private TextView tv_home_name;
|
|
|
+// private ImageView iv_home_logo;
|
|
|
+// private TextView tv_home_score;
|
|
|
+// private TextView tv_home_round;
|
|
|
+// private TextView tv_away_name;
|
|
|
+// private ImageView iv_away_logo;
|
|
|
+// private TextView tv_away_score;
|
|
|
+// private TextView tv_away_round;
|
|
|
+// private TextView tv_desc;
|
|
|
+// //未开始
|
|
|
+// private ViewGroup cl_two;
|
|
|
+// private TextView tv_home_name_two;
|
|
|
+// private ImageView iv_home_logo_two;
|
|
|
+// private TextView tv_center;
|
|
|
+// private ImageView iv_away_logo_two;
|
|
|
+// private TextView tv_away_name_two;
|
|
|
+// private TextView tv_desc_two;
|
|
|
+// private TabLayout tabLayout;
|
|
|
+// public ViewPager mViewPager;
|
|
|
+// private List<Fragment> mViewList;
|
|
|
+//
|
|
|
+// private CricketMatchBean mModel;
|
|
|
+//
|
|
|
+//// @Override
|
|
|
+//// public boolean getStatusBarTextColor() {
|
|
|
+//// return true;
|
|
|
+//// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// protected int getLayoutResId() {
|
|
|
+// return R.layout.activity_cricket_detail;
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public String setActionBarTitle() {
|
|
|
+// return null;
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// protected CricketDetailPresenter createPresenter() {
|
|
|
+// return new CricketDetailPresenter(this);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// protected void initView(View view) {
|
|
|
+// mMatchId = getIntent().getIntExtra("matchId", 0);
|
|
|
+// isNotification = getIntent().getBooleanExtra("isNotification", false);
|
|
|
+// ll_content = view.findViewById(R.id.ll_content);
|
|
|
+// cl_one = view.findViewById(R.id.cl_one);
|
|
|
+// tv_home_name = view.findViewById(R.id.tv_home_name);
|
|
|
+// iv_home_logo = view.findViewById(R.id.iv_home_logo);
|
|
|
+// tv_home_score = view.findViewById(R.id.tv_home_score);
|
|
|
+// tv_home_round = view.findViewById(R.id.tv_home_round);
|
|
|
+// tv_away_name = view.findViewById(R.id.tv_away_name);
|
|
|
+// iv_away_logo = view.findViewById(R.id.iv_away_logo);
|
|
|
+// tv_away_score = view.findViewById(R.id.tv_away_score);
|
|
|
+// tv_away_round = view.findViewById(R.id.tv_away_round);
|
|
|
+// tv_desc = view.findViewById(R.id.tv_desc);
|
|
|
+// cl_two = view.findViewById(R.id.cl_two);
|
|
|
+// tv_home_name_two = view.findViewById(R.id.tv_home_name_two);
|
|
|
+// iv_home_logo_two = view.findViewById(R.id.iv_home_logo_two);
|
|
|
+// tv_center = view.findViewById(R.id.tv_center);
|
|
|
+// iv_away_logo_two = view.findViewById(R.id.iv_away_logo_two);
|
|
|
+// tv_away_name_two = view.findViewById(R.id.tv_away_name_two);
|
|
|
+// tv_desc_two = view.findViewById(R.id.tv_desc_two);
|
|
|
+// tabLayout = view.findViewById(R.id.tab_layout);
|
|
|
+// mViewPager = view.findViewById(R.id.view_pager);
|
|
|
+// mFlWebview1 = view.findViewById(R.id.fl_webview1);
|
|
|
+// mFlWebview2 = view.findViewById(R.id.fl_webview2);
|
|
|
+// mWvAnimation = view.findViewById(R.id.wv_animation);
|
|
|
+// mWvVideo = view.findViewById(R.id.wv_video);
|
|
|
+// subscribeIv = view.findViewById(R.id.iv_subscribe);
|
|
|
+//
|
|
|
+// view.findViewById(R.id.tv_animation).setOnClickListener(this);
|
|
|
+// view.findViewById(R.id.tv_video).setOnClickListener(this);
|
|
|
+// view.findViewById(R.id.iv_back_three).setOnClickListener(this);
|
|
|
+// view.findViewById(R.id.iv_back_four).setOnClickListener(this);
|
|
|
+//
|
|
|
+// ((ImageView) view.findViewById(R.id.iv_right)).setBackgroundResource(R.mipmap.icon_share2);
|
|
|
+// ((ImageView) view.findViewById(R.id.iv_right)).setOnClickListener(new View.OnClickListener() {
|
|
|
+// @Override
|
|
|
+// public void onClick(View v) {
|
|
|
+// ShareUtil.shareText(getContext(), "", HttpConstant.CRICKET_DETAIL_URL + mMatchId);
|
|
|
+// }
|
|
|
+// });
|
|
|
+//
|
|
|
+// ((ImageView) view.findViewById(R.id.inner_report)).setOnClickListener(new View.OnClickListener() {
|
|
|
+// @Override
|
|
|
+// public void onClick(View v) {
|
|
|
+// new XPopup.Builder(getContext())
|
|
|
+// .moveUpToKeyboard(false) //如果不加这个,评论弹窗会移动到软键盘上面
|
|
|
+// .enableDrag(true)
|
|
|
+// .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
|
|
|
+// .asCustom(new ReportBottomPopup(getContext()))
|
|
|
+// .show();
|
|
|
+// }
|
|
|
+// });
|
|
|
+//
|
|
|
+// initData();
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// protected void initData() {
|
|
|
+// tabLayout.addTab(tabLayout.newTab().setText(getContext().getString(R.string.fantasy)));
|
|
|
+// tabLayout.addTab(tabLayout.newTab().setText(getContext().getString(R.string.info)));
|
|
|
+// tabLayout.addTab(tabLayout.newTab().setText(getContext().getString(R.string.live)));
|
|
|
+// tabLayout.addTab(tabLayout.newTab().setText(getContext().getString(R.string.scorecard)));
|
|
|
+//// tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.highlights)));
|
|
|
+// //TODO 暂时屏蔽
|
|
|
+//// tabLayout.addTab(tabLayout.newTab().setText(getString(R.string.updates)));
|
|
|
+// tabLayout.addTab(tabLayout.newTab().setText(getContext().getString(R.string.squad)));
|
|
|
+//
|
|
|
+// mViewList = new ArrayList<>();
|
|
|
+// mViewList.add(CricketFantasyFragment.newInstance());
|
|
|
+// mViewList.add(CricketInfoFragment.newInstance(mMatchId));
|
|
|
+// mViewList.add(CricketLiveFragment.newInstance(mMatchId));
|
|
|
+// mViewList.add(CricketScorecardFragment.newInstance());
|
|
|
+//// mViewList.add(CricketFantasyFragment.newInstance());
|
|
|
+// //TODO 暂时屏蔽
|
|
|
+//// mViewList.add(CricketUpdatesFragment.newInstance());
|
|
|
+// mViewList.add(CricketSquadFragment.newInstance());
|
|
|
+//
|
|
|
+// initViewPager();
|
|
|
+// mvpPresenter.getDetail(mMatchId);
|
|
|
+// mvpPresenter.getUpdatesDetail(mMatchId);
|
|
|
+// if (isNotification) {
|
|
|
+// mViewPager.setCurrentItem(2);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// private void initViewPager() {
|
|
|
+// tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
|
|
+// @Override
|
|
|
+// public void onTabSelected(TabLayout.Tab tab) {
|
|
|
+// mViewPager.setCurrentItem(tab.getPosition());
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onTabUnselected(TabLayout.Tab tab) {
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onTabReselected(TabLayout.Tab tab) {
|
|
|
+//
|
|
|
+// }
|
|
|
+// });
|
|
|
+// //初始化viewpager
|
|
|
+// mViewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
|
|
+// @Override
|
|
|
+// public void onPageScrolled(int i, float v, int i1) {
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onPageSelected(int i) {
|
|
|
+// tabLayout.getTabAt(i).select();
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onPageScrollStateChanged(int i) {
|
|
|
+//
|
|
|
+// }
|
|
|
+// });
|
|
|
+// mViewPager.setOffscreenPageLimit(mViewList.size());
|
|
|
+// mViewPager.setAdapter(new FragmentPagerAdapter() {
|
|
|
+// @Override
|
|
|
+// public Fragment getItem(int i) {
|
|
|
+// return mViewList.get(i);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public int getCount() {
|
|
|
+// return mViewList.size();
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void showLoading() {
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void hideLoading() {
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void getDataSuccess(CricketMatchBean model) {
|
|
|
+// if (model != null) {
|
|
|
+// mModel = model;
|
|
|
+// ((CricketFantasyFragment) mViewList.get(0)).getData(mMatchId, model.getHome_name(), model.getHome_logo(), model.getAway_name(), model.getAway_logo());
|
|
|
+// if (!TextUtils.isEmpty(model.getTournament_id())) {
|
|
|
+// ((CricketInfoFragment) mViewList.get(1)).getList(model.getHome_id(), model.getAway_id(), Integer.valueOf(model.getTournament_id()));
|
|
|
+// }
|
|
|
+// //TODO 暂时屏蔽
|
|
|
+//// ((CricketSquadFragment)mViewList.get(5)).getList(mMatchId, model.getHome_name(), model.getHome_logo(), model.getAway_name(), model.getAway_logo());
|
|
|
+// ((CricketSquadFragment) mViewList.get(4)).getList(mMatchId, model.getHome_name(), model.getHome_logo(), model.getAway_name(), model.getAway_logo());
|
|
|
+//
|
|
|
+// if (model.getStatus() == 0) {
|
|
|
+// cl_one.setVisibility(View.GONE);
|
|
|
+// cl_two.setVisibility(View.VISIBLE);
|
|
|
+// if (!TextUtils.isEmpty(model.getHome_name())) {
|
|
|
+// tv_home_name_two.setText(model.getHome_name());
|
|
|
+// }
|
|
|
+// GlideUtil.loadTeamImageDefault(getContext(), model.getHome_logo(), iv_home_logo_two);
|
|
|
+//
|
|
|
+// if (!TextUtils.isEmpty(model.getAway_name())) {
|
|
|
+// tv_away_name_two.setText(model.getAway_name());
|
|
|
+// }
|
|
|
+// GlideUtil.loadTeamImageDefault(getContext(), model.getAway_logo(), iv_away_logo_two);
|
|
|
+// String strOne = getContext().getString(R.string.match_starts_in);
|
|
|
+// if (!TextUtils.isEmpty(model.getLive_time())) {
|
|
|
+// String strTwo = model.getLive_time();
|
|
|
+// SpannableStringBuilder builder = new SpannableStringBuilder(strOne + strTwo);
|
|
|
+// builder.setSpan(new ForegroundColorSpan(getContext().getResources().getColor(R.color.c_DC3C23)), strOne.length(), (strOne.length() + strTwo.length()), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
|
|
+// tv_center.setText(builder);
|
|
|
+// } else {
|
|
|
+// tv_center.setText(strOne);
|
|
|
+// }
|
|
|
+// String str = "";
|
|
|
+// if (!TextUtils.isEmpty(model.getMatch_result())) {
|
|
|
+// str = model.getMatch_result() + "\n";
|
|
|
+// }
|
|
|
+// if (!TextUtils.isEmpty(model.getVenue_name())) {
|
|
|
+// str = str + model.getVenue_name();
|
|
|
+// }
|
|
|
+// tv_desc_two.setText(str);
|
|
|
+// } else {
|
|
|
+// cl_one.setVisibility(View.VISIBLE);
|
|
|
+// cl_two.setVisibility(View.GONE);
|
|
|
+// if (!TextUtils.isEmpty(model.getHome_name())) {
|
|
|
+// tv_home_name.setText(model.getHome_name());
|
|
|
+// }
|
|
|
+// GlideUtil.loadTeamImageDefault(this, model.getHome_logo(), iv_home_logo);
|
|
|
+// if (!TextUtils.isEmpty(model.getHome_display_score())) {
|
|
|
+// tv_home_score.setText(model.getHome_display_score());
|
|
|
+// }
|
|
|
+// if (!TextUtils.isEmpty(model.getHome_display_overs())) {
|
|
|
+// tv_home_round.setText("(" + model.getHome_display_overs() + ")");
|
|
|
+// }
|
|
|
+// if (!TextUtils.isEmpty(model.getAway_name())) {
|
|
|
+// tv_away_name.setText(model.getAway_name());
|
|
|
+// }
|
|
|
+// GlideUtil.loadTeamImageDefault(this, model.getAway_logo(), iv_away_logo);
|
|
|
+// if (!TextUtils.isEmpty(model.getAway_display_score())) {
|
|
|
+// tv_away_score.setText(model.getAway_display_score());
|
|
|
+// }
|
|
|
+// if (!TextUtils.isEmpty(model.getAway_display_overs())) {
|
|
|
+// tv_away_round.setText("(" + model.getAway_display_overs() + ")");
|
|
|
+// }
|
|
|
+// if (!TextUtils.isEmpty(model.getMatch_result())) {
|
|
|
+// tv_desc.setText(model.getMatch_result());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (model.getStatus() == 2) {
|
|
|
+// subscribeIv.setVisibility(View.GONE);
|
|
|
+// } else {
|
|
|
+// subscribeIv.setVisibility(View.VISIBLE);// TODO: 2023/2/15 这里在订阅接口调试好后要放开为visible
|
|
|
+// if (model.getIs_subscribe() == 1) {//已经订阅过了
|
|
|
+// subscribeIv.setImageResource(R.mipmap.subscribe);
|
|
|
+// } else {
|
|
|
+// subscribeIv.setImageResource(R.mipmap.unsubscribe);
|
|
|
+// }
|
|
|
+// subscribeIv.setOnClickListener(new View.OnClickListener() {
|
|
|
+// @Override
|
|
|
+// public void onClick(View v) {
|
|
|
+// if (!UserConfig.getInstance(UserConfig.selectedAccount).isClientActivated()) {
|
|
|
+// ToastUtil.show(NewCricketDetailActivity.this, getString(R.string.please_login));
|
|
|
+// // TODO: 2023/3/16 需要跳转到登陆界面
|
|
|
+//// return;
|
|
|
+// }
|
|
|
+// getSubscribeType(model, subscribeIv);
|
|
|
+// // TODO: 2023/2/14 订阅消息推送
|
|
|
+//// //这里先弹出一个订阅消息的内容选择框 待选择好后点击确定订阅按钮再调用订阅接口
|
|
|
+//// DialogUtil.showSelectSubscribeDialog(mContext, item.getHome_name() + " VS " + item.getAway_name(), new DialogUtil.SelectSubscribeBack() {
|
|
|
+//// @Override
|
|
|
+//// public void onSelectSubscribe(String type) {
|
|
|
+//// doSubscribe(item.getMatch_id() + "", , subscribeIv);
|
|
|
+//// }
|
|
|
+//// });
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+// //初始化动画直播地址
|
|
|
+// initWebViewOne(mModel.getLive_path());
|
|
|
+// //初始化视频直播地址
|
|
|
+//// initWebViewTwo(mModel.getLive_url());
|
|
|
+// //请求记分卡数据
|
|
|
+// ((CricketScorecardFragment) mViewList.get(3)).getData(mModel);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void getUpdatesDataSuccess(List<UpdatesBean> list) {
|
|
|
+// //TODO 暂时屏蔽
|
|
|
+//// ((CricketUpdatesFragment)mViewList.get(4)).setData(list);
|
|
|
+// }
|
|
|
+//
|
|
|
+// private void initWebViewOne(String url) {
|
|
|
+// if (TextUtils.isEmpty(url)) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// /* 设置支持Js */
|
|
|
+// mWvAnimation.getSettings().setJavaScriptEnabled(true);
|
|
|
+// /* 设置为true表示支持使用js打开新的窗口 */
|
|
|
+// mWvAnimation.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
|
|
|
+//
|
|
|
+// /* 设置缓存模式 */
|
|
|
+// mWvAnimation.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
|
|
|
+// mWvAnimation.getSettings().setDomStorageEnabled(true);
|
|
|
+//
|
|
|
+// /* 设置为使用webview推荐的窗口 */
|
|
|
+//// mWebView.getSettings().setUseWideViewPort(true);
|
|
|
+// /* 设置为使用屏幕自适配 */
|
|
|
+// mWvAnimation.getSettings().setLoadWithOverviewMode(true);
|
|
|
+// /* 设置是否允许webview使用缩放的功能,我这里设为false,不允许 */
|
|
|
+// mWvAnimation.getSettings().setBuiltInZoomControls(false);
|
|
|
+// /* 提高网页渲染的优先级 */
|
|
|
+// mWvAnimation.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
|
|
|
+//
|
|
|
+// /* HTML5的地理位置服务,设置为true,启用地理定位 */
|
|
|
+// mWvAnimation.getSettings().setGeolocationEnabled(true);
|
|
|
+// /* 设置可以访问文件 */
|
|
|
+// mWvAnimation.getSettings().setAllowFileAccess(true);
|
|
|
+//
|
|
|
+// // 设置UserAgent标识
|
|
|
+//// mWebView.getSettings().setUserAgentString(mWebView.getSettings().getUserAgentString() + " app-shikuimapp");
|
|
|
+// mWvAnimation.loadUrl(url);
|
|
|
+// }
|
|
|
+//
|
|
|
+// private void initWebViewTwo(String url) {
|
|
|
+// if (TextUtils.isEmpty(url)) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// /* 设置支持Js */
|
|
|
+// mWvVideo.getSettings().setJavaScriptEnabled(true);
|
|
|
+// /* 设置为true表示支持使用js打开新的窗口 */
|
|
|
+// mWvVideo.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
|
|
|
+//
|
|
|
+// /* 设置缓存模式 */
|
|
|
+// mWvVideo.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
|
|
|
+// mWvVideo.getSettings().setDomStorageEnabled(true);
|
|
|
+//
|
|
|
+// /* 设置为使用webview推荐的窗口 */
|
|
|
+//// mWebView.getSettings().setUseWideViewPort(true);
|
|
|
+// /* 设置为使用屏幕自适配 */
|
|
|
+// mWvVideo.getSettings().setLoadWithOverviewMode(true);
|
|
|
+// /* 设置是否允许webview使用缩放的功能,我这里设为false,不允许 */
|
|
|
+// mWvVideo.getSettings().setBuiltInZoomControls(false);
|
|
|
+// /* 提高网页渲染的优先级 */
|
|
|
+// mWvVideo.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
|
|
|
+//
|
|
|
+// /* HTML5的地理位置服务,设置为true,启用地理定位 */
|
|
|
+// mWvVideo.getSettings().setGeolocationEnabled(true);
|
|
|
+// /* 设置可以访问文件 */
|
|
|
+// mWvVideo.getSettings().setAllowFileAccess(true);
|
|
|
+//
|
|
|
+// // 设置UserAgent标识
|
|
|
+//// mWebView.getSettings().setUserAgentString(mWebView.getSettings().getUserAgentString() + " app-shikuimapp");
|
|
|
+// mWvVideo.loadUrl(url);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void getDataFail(String msg) {
|
|
|
+// ToastUtil.show(mActivity, msg);
|
|
|
+// finish();
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onClick(View v) {
|
|
|
+// int id = v.getId();
|
|
|
+// if (id == R.id.tv_animation) {
|
|
|
+// if (mModel != null) {
|
|
|
+// mFlWebview1.setVisibility(View.VISIBLE);
|
|
|
+// mFlWebview2.setVisibility(View.GONE);
|
|
|
+// ll_content.setVisibility(View.GONE);
|
|
|
+// }
|
|
|
+// } else if (id == R.id.tv_video) {
|
|
|
+// if (mModel != null) {
|
|
|
+// mFlWebview1.setVisibility(View.GONE);
|
|
|
+// mFlWebview2.setVisibility(View.VISIBLE);
|
|
|
+// ll_content.setVisibility(View.GONE);
|
|
|
+// }
|
|
|
+// } else if (id == R.id.iv_back_three || id == R.id.iv_back_four) {
|
|
|
+// mFlWebview1.setVisibility(View.GONE);
|
|
|
+// mFlWebview2.setVisibility(View.GONE);
|
|
|
+// ll_content.setVisibility(View.VISIBLE);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// protected void onDestroy() {
|
|
|
+// super.onDestroy();
|
|
|
+// if (mWvAnimation != null) {
|
|
|
+// mWvAnimation.destroy();
|
|
|
+// }
|
|
|
+// if (mWvVideo != null) {
|
|
|
+// mWvVideo.destroy();
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// private void doSubscribe(String matchId, String type, ImageView subscribeIv) {//订阅推送消息
|
|
|
+// new SubscribePresenter().doSubscribe(matchId, type, new ApiCallback() {
|
|
|
+// @Override
|
|
|
+// public void onSuccess(String data, String msg) {
|
|
|
+// if (!TextUtils.isEmpty(type)) {
|
|
|
+// subscribeIv.setImageResource(R.mipmap.subscribe);
|
|
|
+// } else {
|
|
|
+// subscribeIv.setImageResource(R.mipmap.unsubscribe);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onFailure(String msg) {
|
|
|
+// ToastUtil.show(NewCricketDetailActivity.this, msg);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onError(String msg) {
|
|
|
+// ToastUtil.show(NewCricketDetailActivity.this, msg);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onFinish() {
|
|
|
+//
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+//
|
|
|
+// private void getSubscribeType(CricketMatchBean item, ImageView subscribeIv) {//订阅推送消息
|
|
|
+// showLoadingDialog();
|
|
|
+// new SubscribePresenter().getSubscribeType(item.getId(), new ApiCallback() {
|
|
|
+// @Override
|
|
|
+// public void onSuccess(String data, String msg) {
|
|
|
+// dismissLoadingDialog();
|
|
|
+// if (data != null) {
|
|
|
+// List<SubscribeTypeBean> list = JSONObject.parseArray(JSONObject.parseObject(data).getString("list"), SubscribeTypeBean.class);
|
|
|
+// //这里先弹出一个订阅消息的内容选择框 待选择好后点击确定订阅按钮再调用订阅接口
|
|
|
+// DialogUtil.showSelectSubscribeDialog(NewCricketDetailActivity.this, item.getHome_name() + " VS " + item.getAway_name(), list, new DialogUtil.SelectSubscribeBack() {
|
|
|
+// @Override
|
|
|
+// public void onSelectSubscribe(String type) {
|
|
|
+// doSubscribe(item.getId() + "", type, subscribeIv);
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onFailure(String msg) {
|
|
|
+// dismissLoadingDialog();
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onError(String msg) {
|
|
|
+// dismissLoadingDialog();
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onFinish() {
|
|
|
+// dismissLoadingDialog();
|
|
|
+// }
|
|
|
+// });
|
|
|
+// }
|
|
|
+//}
|