Commit 3c9214ac authored by mengcuiguang's avatar mengcuiguang

添加来电秀

parent 0597cb5d
......@@ -9,8 +9,8 @@ android {
applicationId "com.mints.goodmoney"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 15
versionName "1.1.4"
versionCode 16
versionName "1.1.5"
flavorDimensions "default"
// dex突破65535的限制
......@@ -175,8 +175,6 @@ dependencies {
implementation 'com.king.zxing:zxing-lite:1.1.7-androidx'
// toast
implementation 'com.hjq:toast:8.8'
// 视频
implementation 'cn.jzvd:jiaozivideoplayer:7.0.5'
// 附件下载更新
implementation 'com.mindorks.android:prdownloader:0.6.0'
// 圆角库
......
......@@ -563,18 +563,6 @@
# ===================== JZVedio START ================
-keep public class cn.jzvd.JZMediaSystem {*; }
-keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; }
-keep class tv.danmaku.ijk.media.player.** {*; }
-dontwarn tv.danmaku.ijk.media.player.*
-keep interface tv.danmaku.ijk.media.player.** { *; }
# ======================= JZVedio END ================
# ===================== 微转分享 START ================
-keep class com.xiangzi.*{*;}
......
......@@ -42,7 +42,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
private var downloadId: Int = -1//vedio下载id
private var downloadVedioSucFlag = false// 下载视频成功
private var vedioName = ""
private var vedioPathName = ""
override fun getContentViewLayoutID() = R.layout.activity_kyl_video
......@@ -125,7 +125,8 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
} catch (e: java.lang.Exception) {
vedioPath = filesDir.absolutePath + "/video/"
}
vedioName = MD5.GetMD5Code(System.currentTimeMillis().toString() + UserManager.getInstance().userID + videoUrl) + ".mp4"
val vedioName = MD5.GetMD5Code(System.currentTimeMillis().toString() + UserManager.getInstance().userID + videoUrl) + ".mp4"
vedioPathName = vedioPath + vedioName
downloadId = PRDownloader.download(videoUrl, vedioPath, vedioName)
.build()
.start(object : OnDownloadListener {
......@@ -194,8 +195,8 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
}
private fun vedioAdingSuccess(adType: String) {
if (downloadVedioSucFlag) {
DetailActivity.startSelf(this@KylVideoActivity, vedioName)
if (downloadVedioSucFlag && !TextUtils.isEmpty(vedioPathName)) {
DetailActivity.startSelf(this@KylVideoActivity, vedioPathName)
}
}
}
......@@ -172,13 +172,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
override fun onTabSelected(tab: XTabLayout.Tab) {
// if (tab.position == 3) {
// if (!UserManager.getInstance().userIsLogin()) {
// readyGo(WxLoginActivity::class.java)
// vpFragmentMoney.currentItem = if (curPosition == 3) 0 else curPosition
// return
// }
// }
when (tab.position) {
0 -> {
if (AppConfig.showAdFlag) {
......@@ -220,12 +213,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
}
addOrShowFragment(childFragmentManager, xmlyGameFragment!!, FRAGMENT_TAG_XMLY)
}
3 -> {
if (liebaoGameFragment == null) {
liebaoGameFragment = LiebaoGameFragment()
}
addOrShowFragment(childFragmentManager, liebaoGameFragment!!, FRAGMENT_TAG_GAME)
}
// 3 -> {
// if (liebaoGameFragment == null) {
// liebaoGameFragment = LiebaoGameFragment()
......
package com.mints.goodmoney.ui.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import cn.jzvd.JZDataSource;
import cn.jzvd.JzvdStd;
public class JZVideoPlayerStandardLoopVideo extends JzvdStd {
private JZVedioStatusListener jzVedioStatusListener;
private boolean isVedioRestart = true;//true-重复播放视频
public void setJzVedioStatusListener(JZVedioStatusListener jzVedioStatusListener) {
this.jzVedioStatusListener = jzVedioStatusListener;
}
public JZVideoPlayerStandardLoopVideo(Context context) {
super(context);
}
public JZVideoPlayerStandardLoopVideo(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onStatePlaying() {
super.onStatePlaying();
if (jzVedioStatusListener != null) {
jzVedioStatusListener.jzVedioPlaying();
}
}
@Override
public void onAutoCompletion() {
super.onAutoCompletion();
try {
if (isVedioRestart) {
startVideo();
}
} catch (Exception e) {
e.printStackTrace();
}
}
public interface JZVedioStatusListener {
void jzVedioPlaying();
}
@Override
public void setUp(JZDataSource jzDataSource, int screen) {
super.setUp(jzDataSource, screen);
try {
if (screen != SCREEN_NORMAL) {
fullscreenButton.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.VISIBLE);
currentTimeTextView.setVisibility(View.VISIBLE);
totalTimeTextView.setVisibility(View.VISIBLE);
} else {
fullscreenButton.setVisibility(View.INVISIBLE);
progressBar.setVisibility(View.INVISIBLE);
currentTimeTextView.setVisibility(View.INVISIBLE);
totalTimeTextView.setVisibility(View.INVISIBLE);
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 设置视频是否重复播放 true-重复播放
*/
public void setVedioRestart(boolean isVedioRestart) {
this.isVedioRestart = isVedioRestart;
}
// public int getJZVedioState(){
// return state;
// }
}
......@@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="120dp"
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_margin="30dp"
android:gravity="center"
android:text="@string/permission_tip"
android:textColor="@color/colorAccent"
......@@ -118,9 +118,9 @@
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="50dp"
android:layout_marginLeft="60dp"
android:layout_marginTop="30dp"
android:layout_marginTop="40dp"
android:layout_marginRight="60dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_tv_gold"
......@@ -128,5 +128,5 @@
android:onClick="getPermission"
android:text="@string/get_permission"
android:textColor="@color/white"
android:textSize="20sp" />
android:textSize="18sp" />
</LinearLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment