| | |
| | | </deviceKey> |
| | | </Target> |
| | | </runningDeviceTargetSelectedWithDropDown> |
| | | <timeTargetWasSelectedWithDropDown value="2022-01-07T10:09:52.108080400Z" /> |
| | | <timeTargetWasSelectedWithDropDown value="2022-01-10T02:41:08.201462200Z" /> |
| | | </component> |
| | | </project> |
| | |
| | | <entry key="..\:/Users/Administrator/Downloads/android/ZhiBo/library-login/src/main/res/layout/activity_forget_pwd.xml" value="0.25" /> |
| | | <entry key="..\:/Users/Administrator/Downloads/android/ZhiBo/library-login/src/main/res/layout/activity_login.xml" value="0.33" /> |
| | | <entry key="..\:/Users/Administrator/Downloads/android/ZhiBo/library-login/src/main/res/layout/activity_register.xml" value="0.37447916666666664" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/activity_main.xml" value="0.35885416666666664" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/activity_settings.xml" value="0.20208333333333334" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/activity_video_player.xml" value="0.2916666666666667" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/fragment_feed_videos.xml" value="0.3380208333333333" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/fragment_home.xml" value="0.2381835032437442" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/fragment_mine.xml" value="0.23697916666666666" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/navigation_bottom_bar.xml" value="0.35885416666666664" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/app/src/main/res/layout/popupwindow_video_review.xml" value="0.19166666666666668" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/library-login/src/main/res/layout/activity_forget_pwd.xml" value="0.35885416666666664" /> |
| | | <entry key="..\:/workspace/Android/ZhiBo/library-login/src/main/res/layout/activity_register.xml" value="0.5" /> |
| | | </map> |
| | | </option> |
| | | </component> |
| | |
| | | minSdk 21 |
| | | targetSdk 29 |
| | | versionCode 200 |
| | | versionName "1.0" |
| | | versionName "2.1.0" |
| | | |
| | | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| | | |
| | |
| | | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| | | } |
| | | } |
| | | |
| | | //配置自定义打包名称 |
| | | applicationVariants.all { variant -> |
| | | variant.outputs.all { |
| | | def fileName |
| | | if (variant.buildType.name.equals('release')) { |
| | | fileName = "dszb_${variant.mergedFlavor.versionName}_release.apk" |
| | | } else if (variant.buildType.name.equals('debug')) { |
| | | fileName = "${variant.mergedFlavor.versionName}_debug.apk" |
| | | } |
| | | outputFileName = fileName |
| | | } |
| | | } |
| | | |
| | | compileOptions { |
| | | sourceCompatibility JavaVersion.VERSION_1_8 |
| | | targetCompatibility JavaVersion.VERSION_1_8 |
| | |
| | | package="com.ysvideo.zhibo.app"> |
| | | |
| | | <application |
| | | android:name="com.ysvideo.zhibo.app.MyApplication" |
| | | android:name=".MyApplication" |
| | | android:allowBackup="true" |
| | | android:icon="@mipmap/ic_launcher" |
| | | android:label="@string/app_name" |
| | |
| | | |
| | | </meta-data> |
| | | |
| | | <provider |
| | | android:name="androidx.core.content.FileProvider" |
| | | android:authorities="${applicationId}.fileprovider" |
| | | android:exported="false" |
| | | android:grantUriPermissions="true"> |
| | | <meta-data |
| | | android:name="android.support.FILE_PROVIDER_PATHS" |
| | | android:resource="@xml/gdt_file_path" /> |
| | | </provider> |
| | | |
| | | |
| | | <activity |
| | | android:name="com.ysvideo.zhibo.app.ui.SplashActivity" |
| | | android:name=".ui.SplashActivity" |
| | | android:label="@string/app_name"> |
| | | <intent-filter> |
| | | <action android:name="android.intent.action.MAIN" /> |
| | |
| | | pptvNoAdReward("pptvNoAdReward"),//PPTV无广告激励视频 |
| | | homeInterstitial("homeInterstitial"),//首页插屏 |
| | | exitAppFullvideo("exitAppFullvideo"),//应用退出全屏 |
| | | splashHotStart("splashHotStart") |
| | | splashHotStart("splashHotStart"), |
| | | other("other")//其他广告位 |
| | | ; |
| | | |
| | | private String positionName; |
| | |
| | | package com.ysvideo.zhibo.app.ui; |
| | | |
| | | import android.content.DialogInterface; |
| | | import android.os.Build; |
| | | import android.os.Bundle; |
| | | import android.view.KeyEvent; |
| | | import android.view.View; |
| | |
| | | |
| | | import com.androidquery.AQuery; |
| | | import com.ysvideo.zhibo.app.R; |
| | | import com.ysvideo.zhibo.app.entity.ad.AdPositionEnum; |
| | | import com.ysvideo.zhibo.app.ui.dialog.ExitDialog; |
| | | import com.ysvideo.zhibo.app.ui.main.DYFeedFragment; |
| | | import com.ysvideo.zhibo.app.ui.main.DYNewsFragment; |
| | |
| | | import com.ysvideo.zhibo.lib.common.activity.BaseActivity; |
| | | import com.ysvideo.zhibo.lib.common.dialog.DialogUtil; |
| | | import com.ysvideo.zhibo.lib.common.util.FragmentSwitchHelperV2; |
| | | import com.ysvideo.zhibo.library_ad.AdUtil; |
| | | import com.ysvideo.zhibo.library_ad.IntertitialAdUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | DialogUtil.dismiss(exitDialog); |
| | | } |
| | | }).create(); |
| | | |
| | | rg_nav.postDelayed(intertitialRunnable, 3000); |
| | | } |
| | | |
| | | ExitDialog exitDialog = null; |
| | | |
| | | @Override |
| | | public boolean onKeyDown(int keyCode, KeyEvent event) { |
| | | if (keyCode == KeyEvent.KEYCODE_BACK) { |
| | |
| | | } |
| | | return super.onKeyDown(keyCode, event); |
| | | } |
| | | |
| | | @Override |
| | | protected void onDestroy() { |
| | | super.onDestroy(); |
| | | rg_nav.removeCallbacks(intertitialRunnable); |
| | | } |
| | | |
| | | private Runnable intertitialRunnable = new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | |
| | | AdUtil.AD_TYPE adType = AdUtil.getAdType(getApplicationContext(), AdPositionEnum.homeInterstitial.name()); |
| | | if (adType != null) { |
| | | //Android 5.0 |
| | | if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT_WATCH) { |
| | | adType = AdUtil.AD_TYPE.gdt; |
| | | } |
| | | |
| | | if (adType == AdUtil.AD_TYPE.csj) { |
| | | IntertitialAdUtil.showAd(MainActivity.this, adType, getResources().getString(R.string.ad_csj_pid_interstital_home)); |
| | | } else { |
| | | IntertitialAdUtil.showAd(MainActivity.this, adType, getResources().getString(R.string.ad_gdt_pid_interstital_home)); |
| | | } |
| | | } |
| | | |
| | | } |
| | | }; |
| | | } |
| | |
| | | "1、我们对您的个人信息(包括但不限于<font color='#FF0000'>设备MAC地址、IMEI/Android ID</font>等信息)的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;<br>" + |
| | | "2、约定我们的限制责任、免责条款;<br>" + |
| | | "3、其他以加粗或斜体字进行标识的重要条款。</b><br>" + |
| | | "如您对协议有任何疑虑,可通过电子邮箱: xcwapp@qq.com 向我们询问,我们将为您竭诚解答。您点击“同意”的行为代表您已阅读完毕并接受以上协议全部条款。如您同意以上协议内容,请您点击“同意”,开始使用您的产品。"; |
| | | "如您对协议有任何疑虑,可通过电子邮箱: yeskeji@foxmail.com 向我们询问,我们将为您竭诚解答。您点击“同意”的行为代表您已阅读完毕并接受以上协议全部条款。如您同意以上协议内容,请您点击“同意”,开始使用您的产品。"; |
| | | |
| | | if (!UserUtil.isAgreeUserProtocol(getApplicationContext()) && !Constant.DEBUG) { |
| | | new UserProtocolDialog.Builder(SplashActivity.this).setNegativeButton("不同意", new DialogInterface.OnClickListener() { |
| | |
| | | |
| | | |
| | | if ("__all__".equalsIgnoreCase(channel)) { |
| | | mAquery.id(R.id.view_statusbar).visibility(View.VISIBLE); |
| | | mAquery.id(R.id.v_status_bar).visibility(View.VISIBLE); |
| | | mIDPWidget = DPSdk.factory().createNewsTabs(params); |
| | | } else { |
| | | mAquery.id(R.id.view_statusbar).visibility(View.GONE); |
| | | mAquery.id(R.id.v_status_bar).visibility(View.GONE); |
| | | mIDPWidget = DPSdk.factory().createNewsOneTab(params); |
| | | } |
| | | Fragment fragment = mIDPWidget.getFragment(); |
| | |
| | | |
| | | private static final String TAG = "HomeFragment"; |
| | | private AQuery mAquery; |
| | | private DYVideoFragment mDYVideoFragment; |
| | | |
| | | @Override |
| | | public int getContentResource() { |
| | |
| | | startActivity(new Intent(getContext(), SearchActivity.class)); |
| | | } |
| | | }); |
| | | getChildFragmentManager().beginTransaction().replace(R.id.fl_container, new DYVideoFragment()).commitAllowingStateLoss(); |
| | | mDYVideoFragment = new DYVideoFragment(); |
| | | getChildFragmentManager().beginTransaction().replace(R.id.fl_container, mDYVideoFragment).commitAllowingStateLoss(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | public void setUserVisibleHint(boolean isVisibleToUser) { |
| | | Log.i(TAG, "setUserVisibleHint:" + isVisibleToUser); |
| | | super.setUserVisibleHint(isVisibleToUser); |
| | | mDYVideoFragment.setUserVisibleHint(isVisibleToUser); |
| | | } |
| | | |
| | | @Override |
| | | public void onHiddenChanged(boolean hidden) { |
| | | Log.i(TAG, "onHiddenChanged:" + hidden); |
| | | super.onHiddenChanged(hidden); |
| | | mDYVideoFragment.onHiddenChanged(hidden); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.androidquery.AQuery; |
| | | import com.bumptech.glide.Glide; |
| | | import com.bumptech.glide.request.RequestOptions; |
| | | import com.ysvideo.zhibo.app.R; |
| | | import com.ysvideo.zhibo.app.entity.ad.AdPositionEnum; |
| | | import com.ysvideo.zhibo.app.entity.user.UserInfo; |
| | | import com.ysvideo.zhibo.app.ui.common.BrowserActivity; |
| | | import com.ysvideo.zhibo.app.ui.mine.PersonInfoActivity; |
| | |
| | | import com.ysvideo.zhibo.app.util.Constant; |
| | | import com.ysvideo.zhibo.app.util.LoginUtil; |
| | | import com.ysvideo.zhibo.app.util.UserUtil; |
| | | import com.ysvideo.zhibo.app.util.api.BasicTextHttpResponseHandler; |
| | | import com.ysvideo.zhibo.app.util.api.HttpApiUtil; |
| | | import com.ysvideo.zhibo.lib.common.RetainViewFragment; |
| | | import com.ysvideo.zhibo.lib.common.util.common.DimenUtils; |
| | | import com.ysvideo.zhibo.lib.common.util.common.StringUtils; |
| | | import com.ysvideo.zhibo.lib.common.util.glide.GlideCircleTransform; |
| | | import com.ysvideo.zhibo.lib.common.util.glide.GlideRoundTransform; |
| | | import com.ysvideo.zhibo.lib.common.util.ui.StatusBarHeightUtil; |
| | | import com.ysvideo.zhibo.lib.common.widget.RatioLayout; |
| | | import com.ysvideo.zhibo.library_ad.AdUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | | |
| | | public class MineFragment extends RetainViewFragment implements View.OnClickListener { |
| | | |
| | | private AQuery mAquery; |
| | | |
| | | |
| | | @Override |
| | | public int getContentResource() { |
| | |
| | | mAquery.id(R.id.ll_privacy).clicked(this); |
| | | mAquery.id(R.id.ll_feed_back).clicked(this); |
| | | mAquery.id(R.id.ll_setting).clicked(this); |
| | | |
| | | mAquery.id(R.id.ll_user_info).clicked(this); |
| | | |
| | | mAquery.id(R.id.ll_top_content).margin(0, DimenUtils.px2dip(getContext(), StatusBarHeightUtil.getStatusBarHeight(getContext())) + 50, 0, 0); |
| | | |
| | | RatioLayout rl_top = (RatioLayout) mAquery.id(R.id.rl_top).getView(); |
| | | if (AdUtil.getAdType(getContext(), AdPositionEnum.other.name()) == null) { |
| | | rl_top.setRatio(0.8f); |
| | | } else { |
| | | rl_top.setRatio(1.0f); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void init() { |
| | |
| | | mAquery.id(R.id.iv_portrait).image(R.drawable.ic_portrait_default); |
| | | } else { |
| | | mAquery.id(R.id.tv_nick_name).text(user.getNickName()); |
| | | Glide.with(getContext()).load(user.getPortrait()).transform(new GlideCircleTransform(getContext())).into(mAquery.id(R.id.iv_portrait).getImageView()); |
| | | Glide.with(getContext()).load(user.getPortrait()).apply(new RequestOptions().placeholder(R.drawable.ic_portrait_default).error(R.drawable.ic_portrait_default)).into(mAquery.id(R.id.iv_portrait).getImageView()); |
| | | } |
| | | } |
| | | |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | init(); |
| | | getPersonInfo(); |
| | | } |
| | | |
| | | |
| | | private void getPersonInfo() { |
| | | if (!UserUtil.isLogin(getContext())) { |
| | | return; |
| | | } |
| | | HttpApiUtil.getPersonInfo(getContext(), UserUtil.getLoginUid(getContext()), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optBoolean("IsPost")) { |
| | | JSONObject data = jsonObject.optJSONObject("Data"); |
| | | |
| | | UserInfo userInfo = new UserInfo(); |
| | | userInfo.setPortrait(data.optString("Portrait")); |
| | | userInfo.setId(data.getString("Id")); |
| | | userInfo.setNickName(data.optString("Nickname")); |
| | | UserUtil.loginSuccess(getContext(), userInfo); |
| | | |
| | | init(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (StringUtils.isEmpty(url)) { |
| | | return; |
| | | } |
| | | startActivity(new Intent(getContext(), BrowserActivity.class).putExtra("url", url).putExtra("title", "关于我们")); |
| | | startActivity(new Intent(getContext(), BrowserActivity.class).putExtra("url", url)); |
| | | } |
| | | break; |
| | | case R.id.ll_kefu: { |
| | |
| | | import com.androidquery.AQuery; |
| | | import com.bumptech.glide.Glide; |
| | | import com.ysvideo.zhibo.app.R; |
| | | import com.ysvideo.zhibo.app.entity.user.UserInfo; |
| | | import com.ysvideo.zhibo.app.ui.common.BrowserActivity; |
| | | import com.ysvideo.zhibo.app.util.UserUtil; |
| | | import com.ysvideo.zhibo.app.util.api.BasicTextHttpResponseHandler; |
| | |
| | | setContentView(R.layout.activity_person_info); |
| | | TopBarUtil.init(this, "个人信息", this); |
| | | |
| | | if (!UserUtil.isLogin(getApplicationContext())) { |
| | | Toast.makeText(getApplicationContext(), "请先登录", Toast.LENGTH_SHORT).show(); |
| | | finish(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | mAQuery = new AQuery(this); |
| | | |
| | | |
| | |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optBoolean("IsPost")) { |
| | | JSONObject data = jsonObject.optJSONObject("Data"); |
| | | |
| | | UserInfo userInfo = new UserInfo(); |
| | | userInfo.setPortrait(data.optString("Portrait")); |
| | | userInfo.setId(data.getString("Id")); |
| | | userInfo.setNickName(data.optString("Nickname")); |
| | | UserUtil.loginSuccess(getApplicationContext(), userInfo); |
| | | |
| | | |
| | | Glide.with(PersonInfoActivity.this).load(data.optString("Portrait")).transform(new GlideCircleTransform(getApplicationContext())).placeholder(R.drawable.ic_portrait_default).error(R.drawable.ic_portrait_default).into(iv_portrait); |
| | | tv_nickName.setText(data.optString("Nickname")); |
| | | tv_birthday.setText(data.optString("Birthday")); |
| | |
| | | * @param uri |
| | | */ |
| | | public void startPhotoZoom(Uri uri) { |
| | | File storageDir = new File(android.os.Environment.getExternalStorageDirectory().getPath() + "/HanJuImg/"); |
| | | File storageDir = new File(android.os.Environment.getExternalStorageDirectory().getPath() + "/ZhiBoImg/"); |
| | | if (!storageDir.exists()) {//没有文件夹则创建 |
| | | storageDir.mkdir(); |
| | | } |
| | |
| | | import com.ysvideo.zhibo.app.util.UserUtil; |
| | | import com.ysvideo.zhibo.lib.common.activity.BaseActivity; |
| | | import com.ysvideo.zhibo.lib.common.util.cache.AndroidCacheUtil; |
| | | import com.ysvideo.zhibo.lib.common.util.common.PackageUtils2; |
| | | import com.ysvideo.zhibo.lib.common.util.common.StringUtils; |
| | | |
| | | public class SettingActivity extends BaseActivity implements View.OnClickListener { |
| | |
| | | mAQuery.id(R.id.rl_about_us).clicked(this); |
| | | mAQuery.id(R.id.rl_user_agreement).clicked(this); |
| | | mAQuery.id(R.id.rl_privacy_policy).clicked(this); |
| | | mAQuery.id(R.id.rl_check_update).clicked(this); |
| | | mAQuery.id(R.id.setting_btn_exit).clicked(this); |
| | | mAQuery.id(R.id.tv_version).text("版本号:"+PackageUtils2.getVersionName(getApplicationContext())); |
| | | |
| | | if (UserUtil.isLogin(getApplicationContext())) { |
| | | mAQuery.id(R.id.setting_btn_exit).visibility(View.VISIBLE); |
| | |
| | | |
| | | switch (v.getId()) { |
| | | case R.id.rl_person_info: { |
| | | startActivity(new Intent(this, BrowserActivity.class).putExtra("url", Constant.USER_AGREEMENT)); |
| | | startActivity(new Intent(this, PersonInfoActivity.class)); |
| | | } |
| | | break; |
| | | case R.id.rl_download: |
| | |
| | | if (StringUtils.isEmpty(url)) { |
| | | return; |
| | | } |
| | | startActivity(new Intent(this, BrowserActivity.class).putExtra("url", Constant.USER_AGREEMENT)); |
| | | startActivity(new Intent(this, BrowserActivity.class).putExtra("url", url)); |
| | | } |
| | | break; |
| | | case R.id.rl_about_us: { |
| | |
| | | if (StringUtils.isEmpty(url)) { |
| | | return; |
| | | } |
| | | startActivity(new Intent(this, BrowserActivity.class).putExtra("url", Constant.USER_AGREEMENT)); |
| | | startActivity(new Intent(this, BrowserActivity.class).putExtra("url", url)); |
| | | } |
| | | break; |
| | | case R.id.rl_user_agreement: |
| | |
| | | UserUtil.logout(getApplicationContext()); |
| | | finish(); |
| | | break; |
| | | |
| | | case R.id.rl_check_update: |
| | | Toast.makeText(getApplicationContext(), "当前已是最新版本", Toast.LENGTH_SHORT).show(); |
| | | break; |
| | | } |
| | | |
| | | } |
| | |
| | | RelativeSizeSpan sizeSpan = new RelativeSizeSpan(0.75f); |
| | | |
| | | if (mVideoInfo.getScore().indexOf(".") > -1) { |
| | | style.setSpan(sizeSpan, mVideoInfo.getScore().indexOf(".")+1, mVideoInfo.getScore().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | style.setSpan(sizeSpan, mVideoInfo.getScore().indexOf(".") + 1, mVideoInfo.getScore().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | tv_score.setText(style); |
| | | } |
| | | |
| | |
| | | rv_episode.setNestedScrollingEnabled(false); |
| | | |
| | | rv_episode.setLayoutManager(ms); |
| | | |
| | | for (int i = 0; i < rv_episode.getItemDecorationCount(); i++) { |
| | | rv_episode.removeItemDecorationAt(i); |
| | | } |
| | | |
| | | rv_episode.addItemDecoration(new SpacesItemDecoration(DimenUtils.dip2px(getContext(), 10))); |
| | | } |
| | | |
| | |
| | | private void initAdvertisement() { |
| | | ExpressAdManager.ExpressAdInfo adInfo = new ExpressAdManager.ExpressAdInfo.Builder().setWidth(ADSize.FULL_WIDTH).setHeight(ADSize.AUTO_HEIGHT).setAdType(AdUtil.getAdType(getApplicationContext(), AdPositionEnum.videoSearch.name())).build(); |
| | | if (adInfo.getAdType() == AdUtil.AD_TYPE.csj) { |
| | | adInfo.setPid(CSJConstant.PID_VIDEO_SEARCH); |
| | | adInfo.setPid(getResources().getString(R.string.ad_csj_pid_expree_common)); |
| | | } else { |
| | | adInfo.setPid(GDTConstant.PID_VIDEO_SEARCH); |
| | | adInfo.setPid(getResources().getString(R.string.ad_gdt_pid_expree_common)); |
| | | } |
| | | ExpressAdManager.getInstance(getApplicationContext()).loadAndRender(this, adInfo, fl_advertisement, null); |
| | | } |
| | |
| | | |
| | | private FrameLayout fl_ad; |
| | | |
| | | |
| | | private PopupWindow popupWindow; |
| | | |
| | | |
| | | private AQuery mAquery; |
| | | |
| | | private VideoWebPlayerFragment mVideoPlayerFragment; |
| | |
| | | if (adType != null) { |
| | | if (TTAdSdk.isInitSuccess() && adType == AdUtil.AD_TYPE.csj) { |
| | | try { |
| | | FullVideoAdManager.getInstance().loadAd(VideoDetailActivity.this, AdUtil.AD_TYPE.csj, CSJConstant.PID_VIDEO_DETAIL_FULL_VIDEO, new FullVideoAdManager.IFullVideoAdListener() { |
| | | FullVideoAdManager.getInstance().loadAd(VideoDetailActivity.this, AdUtil.AD_TYPE.csj,getResources().getString(R.string.ad_csj_pid_fullvideo), new FullVideoAdManager.IFullVideoAdListener() { |
| | | @Override |
| | | public void onFail(String msg) { |
| | | |
| | |
| | | |
| | | } |
| | | } else { |
| | | FullVideoAdManager.getInstance().loadAd(VideoDetailActivity.this, AdUtil.AD_TYPE.gdt, GDTConstant.PID_VIDEO_DETAIL_INSERT, new FullVideoAdManager.IFullVideoAdListener() { |
| | | FullVideoAdManager.getInstance().loadAd(VideoDetailActivity.this, AdUtil.AD_TYPE.gdt, getResources().getString(R.string.ad_gdt_pid_fullvideo), new FullVideoAdManager.IFullVideoAdListener() { |
| | | @Override |
| | | public void onFail(String msg) { |
| | | |
| | |
| | | package com.ysvideo.zhibo.app.ui.video.adapter; |
| | | |
| | | import android.annotation.SuppressLint; |
| | | import android.content.Context; |
| | | import android.graphics.Color; |
| | | import android.text.TextUtils; |
| | |
| | | this.selectVideoEpisodeListener = selectVideoEpisodeListener; |
| | | } |
| | | |
| | | public void setPlayingPosition(int position){ |
| | | public void setPlayingPosition(int position) { |
| | | this.playingPosition = position; |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | |
| | | public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, final int position) { |
| | | public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") int position) { |
| | | final VideoDetailInfo info = videoInfo.getVideoDetailList().get(position); |
| | | EpisodeViewHolder viewHolder = (EpisodeViewHolder) holder; |
| | | setDisplaySize(viewHolder.tv_episode); |
| | |
| | | viewHolder.tv_episode.setTextColor(Color.parseColor("#FFFFFF")); |
| | | } else { |
| | | viewHolder.tv_episode.setBackgroundResource(R.drawable.shape_video_detail_episode_unselected); |
| | | viewHolder.tv_episode.setTextColor(Color.parseColor("#232323")); |
| | | viewHolder.tv_episode.setTextColor(mContext.getResources().getColor(R.color.theme)); |
| | | } |
| | | |
| | | viewHolder.tv_episode.setText(info.getTag()); |
| | |
| | | |
| | | public static final String HOST = "http://api.ysdq.yeshitv.com:8089";//正式上线版本 |
| | | |
| | | // public static final String HOST = "http://193.112.34.40:8086";//测试上线版本 |
| | | |
| | | |
| | | |
| | | public final static boolean isDisableProxy = true; |
| | | |
| | | public static final String USER_AGREEMENT = "http://h5.hanju.goxcw.com/hanju/user_protocol.html"; |
| | | public static final String PRIVACY_POLICY = "http://h5.hanju.goxcw.com/hanju/privacy.html"; |
| | | public static final String DISCLAIMER = "http://h5.hanju.goxcw.com/hanju/disclaimer.html"; |
| | | public static final String USER_AGREEMENT = "http://bwweb.yeshitv.com/zhibo/user_protocol.html"; |
| | | public static final String PRIVACY_POLICY = "http://bwweb.yeshitv.com/zhibo/privacy.html"; |
| | | public static final String DISCLAIMER = "http://bwweb.yeshitv.com/zhibo/disclaimer.html"; |
| | | |
| | | } |
| | |
| | | |
| | | public class CSJConstant { |
| | | |
| | | public static String PID_VIDEO_DETAIL_FULL_VIDEO = ""; |
| | | //全屏视频详情 |
| | | public static String PID_VIDEO_DETAIL_FULL_VIDEO = "947631498"; |
| | | |
| | | public static String PID_VIDEO_SEARCH = ""; |
| | | //视频搜索 |
| | | public static String PID_VIDEO_SEARCH = "947631593"; |
| | | |
| | | //首页插屏 |
| | | public static String PID_HOME_INTERSTITIAL = "947631515"; |
| | | |
| | | //开屏 |
| | | public static String PID_SPLASH = "947631593"; |
| | | |
| | | } |
| | |
| | | public static void isCollect(Context context, String uid, String videoId, |
| | | String thirdType, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("Uid", uid); |
| | | if (uid != null) |
| | | params.put("Uid", uid); |
| | | params.put("Id", videoId); |
| | | params.put("ThirdType", thirdType); |
| | | params.put("Method", "isCollect"); |
| | |
| | | int version = PackageUtils2.getVersionCode(context); |
| | | long time = System.currentTimeMillis(); |
| | | String deviceType = DeviceInfoUtil.getSystemModel(context); |
| | | // params.put("Package", context.getPackageName()); |
| | | params.put("Package", "com.doudou.ysvideo"); |
| | | params.put("Package", context.getPackageName()); |
| | | // params.put("Package", "com.doudou.ysvideo"); |
| | | params.put("Version", version + ""); |
| | | params.put("Device", DeviceInfoUtil.getUtdid(context)); |
| | | params.put("UtdId", params.get("Device")); |
| | |
| | | import com.ysvideo.zhibo.app.R; |
| | | import com.ysvideo.zhibo.app.util.JumpActivityUtil; |
| | | import com.ysvideo.zhibo.app.util.api.HttpApiUtil; |
| | | import com.ysvideo.zhibo.lib.common.util.security.DEScrypt; |
| | | import com.ysvideo.zhibo.library_ec.AlibcTradeUtil; |
| | | import com.google.gson.Gson; |
| | | import com.ysvideo.zhibo.lib.common.util.common.ClipboardUtil; |
| | |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public String apiDecode(String result) { |
| | | return DEScrypt.decode(result); |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void jumpPage(String pageClassName, String paramJson) { |
| | | Intent intent = null; |
| | | JSONObject param = null; |
| | |
| | | @JavascriptInterface |
| | | public String getRequestBaseParams(String json) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | int version = PackageUtils2.getVersionCode(mContext); |
| | | if (!StringUtils.isEmpty(json)) { |
| | | JSONObject jsonObject = null; |
| | | try { |
| | |
| | | |
| | | import android.Manifest; |
| | | import android.app.Activity; |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.content.pm.PackageManager; |
| | |
| | | import android.widget.Toast; |
| | | |
| | | import com.ysvideo.zhibo.app.util.JumpActivityUtil; |
| | | import com.ysvideo.zhibo.lib.common.dialog.DialogUtil; |
| | | import com.ysvideo.zhibo.lib.common.dialog.LoadingDialogUtil; |
| | | import com.ysvideo.zhibo.lib.common.util.Environment; |
| | | import com.ysvideo.zhibo.lib.common.util.common.StringUtils; |
| | | import com.ysvideo.zhibo.lib.common.util.security.MD5Utils; |
| | |
| | | TextView tv_top_bar_middle, tv_top_bar_left2, tv_top_bar_right; |
| | | ImageView iv_right; |
| | | private boolean boo = false; |
| | | private Dialog loadingDialog = null; |
| | | |
| | | public MyJavaInterface(Activity activity) { |
| | | super(activity); |
| | | mContext = activity; |
| | | boo = true; |
| | | loadingDialog = LoadingDialogUtil.getLoadingDialog(activity, ""); |
| | | } |
| | | |
| | | public MyJavaInterface(Activity activity, TextView tv_top_bar_middle |
| | |
| | | AlibcTradeUtil.openAuthLink(mContext, url); |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public void showLoading() { |
| | | |
| | | mContext.runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | DialogUtil.show(loadingDialog); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public void hideLoading() { |
| | | mContext.runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | DialogUtil.dismiss(loadingDialog); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 判断权限集合 是否授权 false授权 true未授权 |
| | | public boolean lacksPermissions(String... permissions) { |
| | | for (String permission : permissions) { |
| | |
| | | ActivityCompat.requestPermissions(mContext, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}, 10023); |
| | | } else {//存储权限已开 |
| | | String md5 = MD5Utils.getMD532(url); |
| | | String path = Environment.getExternalStorageDirectory() |
| | | + "/hanju"; |
| | | String path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) |
| | | + "/zhibo"; |
| | | if (!new File(path).exists()) { |
| | | new File(path).mkdirs(); |
| | | } |
| | | |
| | | File file = new File(path + "/" + md5 + ".jpg"); |
| | | if (!file.exists()) { |
| | | try { |
| | |
| | | success = true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | Toast.makeText(context, e.getMessage(), Toast.LENGTH_LONG).show(); |
| | | } |
| | | |
| | | if (success) { |
| | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:id="@+id/ll_advice" |
| | | style="@style/personInfoItemStyle" |
| | | android:layout_width="match_parent" |
| | |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_help" |
| | | style="@style/settingsItemStyle"> |
| | | style="@style/settingsItemStyle" |
| | | android:visibility="gone"> |
| | | |
| | | <TextView |
| | | style="@style/settingsItemTitleStyle" |
| | |
| | | android:gravity="center_vertical" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" /> |
| | | |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_check_update" |
| | | style="@style/settingsItemStyle"> |
| | | |
| | | <TextView |
| | | style="@style/settingsItemTitleStyle" |
| | | android:layout_alignParentStart="true" |
| | | android:layout_alignParentLeft="true" |
| | | |
| | | android:text="检查更新" /> |
| | | |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_version" |
| | | style="@style/settingsItemContentStyle" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_alignParentEnd="true" |
| | | android:layout_alignParentRight="true" |
| | | android:drawableEnd="@drawable/ic_setting_array_right" |
| | | android:drawableRight="@drawable/ic_setting_array_right" |
| | | android:gravity="center_vertical" |
| | | android:text="" /> |
| | | </RelativeLayout> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" /> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/rl_user_agreement" |
| | |
| | | android:orientation="vertical"> |
| | | |
| | | <View |
| | | android:id="@+id/view_statusbar" |
| | | android:id="@+id/v_status_bar" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="15dp"></View> |
| | | |
| | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:visibility="gone" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:background="#bbffffff" |
| | |
| | | android:orientation="vertical"> |
| | | |
| | | <com.ysvideo.zhibo.lib.common.widget.RatioLayout |
| | | android:id="@+id/rl_top" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:ratio="1"> |
| | | app:ratio="0.8"> |
| | | |
| | | <FrameLayout |
| | | android:layout_width="match_parent" |
| | |
| | | |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_top_content" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="0dp" |
| | | android:layout_marginTop="50dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:orientation="vertical"> |
| | |
| | | android:paddingLeft="38dp" |
| | | android:paddingRight="38dp"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_portrait" |
| | | <androidx.cardview.widget.CardView |
| | | android:layout_width="70dp" |
| | | android:layout_height="70dp" |
| | | android:src="@drawable/ic_portrait_default"></ImageView> |
| | | app:cardCornerRadius="35dp"> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_portrait" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:src="@drawable/ic_portrait_default"></ImageView> |
| | | |
| | | </androidx.cardview.widget.CardView> |
| | | |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_nick_name" |
| | |
| | | |
| | | <TextView |
| | | style="@style/mineFunctionItemTextStyle" |
| | | android:text="意见反馈"> |
| | | android:text="隐私投诉"> |
| | | |
| | | </TextView> |
| | | |
| | |
| | | android:drawableTop="@drawable/selector_nav_draw_video" /> |
| | | |
| | | <RadioButton |
| | | android:visibility="gone" |
| | | android:id="@+id/rb_nav_novel" |
| | | style="@style/homeNavStyle" |
| | | android:drawableTop="@drawable/selector_nav_novel" /> |
| | |
| | | <string name="ad_csj_appid">5261145</string> |
| | | |
| | | |
| | | <!--开屏广告 --> |
| | | <string name="ad_csj_pid_splash">000</string> |
| | | <!--穿山甲广告 --> |
| | | <string name="ad_csj_pid_splash">887669686</string> |
| | | <string name="ad_csj_pid_interstital_home">947631515</string> |
| | | <string name="ad_csj_pid_expree_mine">947631527</string> |
| | | <string name="ad_csj_pid_expree_common">947631593</string> |
| | | <string name="ad_csj_pid_fullvideo">947631498</string> |
| | | |
| | | <!--开屏广告 --> |
| | | <string name="ad_gdt_pid_splash">000</string> |
| | | |
| | | <!--广点通广告 --> |
| | | <string name="ad_gdt_pid_splash">8032889475341506</string> |
| | | <string name="ad_gdt_pid_interstital_home">9072385435146861</string> |
| | | <string name="ad_gdt_pid_expree_mine">8052384445447738</string> |
| | | <string name="ad_gdt_pid_expree_common">3042687455547648</string> |
| | | <string name="ad_gdt_pid_fullvideo">1002385405845863</string> |
| | | |
| | | |
| | | <string name="webview_java_interface_name">yestv</string> |
| | | |
| | |
| | | |
| | | |
| | | import android.app.Activity; |
| | | import android.util.Log; |
| | | |
| | | import com.bytedance.sdk.openadsdk.AdSlot; |
| | | import com.bytedance.sdk.openadsdk.TTAdConstant; |
| | |
| | | import com.qq.e.comm.util.AdError; |
| | | |
| | | public class IntertitialAdUtil { |
| | | |
| | | private static String TAG="IntertitialAdUtil"; |
| | | |
| | | |
| | | public static void showAd(Activity context, AdUtil.AD_TYPE adType, String pid) { |
| | |
| | | //请求广告失败 |
| | | @Override |
| | | public void onError(int code, String message) { |
| | | |
| | | Log.i(TAG,code+":"+ message); |
| | | } |
| | | |
| | | //广告物料加载完成的回调 |
| | |
| | | private void getVerficationCode(String email) { |
| | | timer = new Timer(); |
| | | timer.schedule(new MyTask(), 1000, 1000); |
| | | if (loginListener != null) |
| | | if (loginListener != null) { |
| | | findViewById(R.id.tv_notify).setVisibility(View.VISIBLE); |
| | | loginListener.sendEmailCode(ForgetPwdActivity.this, email, new LoginApiCallBack() { |
| | | @Override |
| | | public void onCallBack(LoginApiResult result) { |
| | | if (result.getCode() == LoginApiResult.CODE_OK) { |
| | | SingleToast.showToast(ForgetPwdActivity.this, "获取验证码成功,请打开邮箱查看!"); |
| | | |
| | | } else { |
| | | SingleToast.showToast(ForgetPwdActivity.this, result.getMsg()); |
| | | handler.sendEmptyMessage(1); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | class MyTask extends TimerTask { |
| | |
| | | public void onCallBack(LoginApiResult result) { |
| | | if (result.getCode() == LoginApiResult.CODE_OK) { |
| | | SingleToast.showToast(RegisterActivity.this, "登录成功"); |
| | | finish(); |
| | | } else { |
| | | SingleToast.showToast(RegisterActivity.this, result.getMsg()); |
| | | } |
| | |
| | | timer.schedule(new MyTask(), 1000, 1000); |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | findViewById(R.id.tv_notify).setVisibility(View.VISIBLE); |
| | | loginListener.sendEmailCode(RegisterActivity.this, email, new LoginApiCallBack() { |
| | | @Override |
| | | public void onCallBack(LoginApiResult result) { |
| | |
| | | android:layout_marginTop="15dp" |
| | | android:gravity="end|bottom" |
| | | android:orientation="horizontal" |
| | | android:paddingTop="12dp" |
| | | android:paddingBottom="12dp"> |
| | | android:paddingTop="12dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | |
| | | android:textSize="13sp"></TextView> |
| | | </FrameLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_notify" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:paddingBottom="12dp" |
| | | android:text="若未收到请确认是否进入垃圾邮箱" |
| | | android:textColor="#FF0000" |
| | | android:textSize="10sp" |
| | | android:visibility="gone"></TextView> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | |
| | | android:layout_marginTop="15dp" |
| | | android:gravity="end|bottom" |
| | | android:orientation="horizontal" |
| | | android:paddingTop="12dp" |
| | | android:paddingBottom="12dp"> |
| | | android:paddingTop="12dp"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | |
| | | android:textSize="13sp"></TextView> |
| | | </FrameLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_notify" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:paddingBottom="12dp" |
| | | android:text="若未收到请确认是否进入垃圾邮箱" |
| | | android:textColor="#FF0000" |
| | | android:textSize="10sp" |
| | | android:visibility="gone"></TextView> |
| | | |
| | | <View |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:background="@color/cut_line"></View> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |