Commit 56a54c9a authored by mengcuiguang's avatar mengcuiguang

代码优化

parent c375752b
......@@ -9,8 +9,8 @@ android {
applicationId "com.mints.goodmoney"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 11
versionName "1.1.0"
versionCode 14
versionName "1.1.3"
flavorDimensions "default"
// dex突破65535的限制
......@@ -178,8 +178,6 @@ dependencies {
implementation 'cn.jzvd:jiaozivideoplayer:7.0.5'
// 附件下载更新
implementation 'com.mindorks.android:prdownloader:0.6.0'
// 视频壁纸
implementation 'com.dingmouren.videowallpaper:videowallpaper:1.0.1'
// 圆角库
implementation 'com.github.SheHuan:NiceImageView:1.0.5'
......
......@@ -227,9 +227,12 @@
android:name=".ui.activitys.KylVedioActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity android:name=".call.detail.DetailActivity" />
<activity android:name=".call.permission.PermissionActivity" />
<activity android:name=".call.detail.DetailApplyActivity" />
<activity android:name=".call.detail.DetailActivity"
android:screenOrientation="portrait"/>
<activity android:name=".call.permission.PermissionActivity"
android:screenOrientation="portrait"/>
<activity android:name=".call.detail.DetailApplyActivity"
android:screenOrientation="portrait"/>
<service
android:name=".service.UpdateService"
......
......@@ -94,6 +94,9 @@ public class FloatingView extends FrameLayout {
}
public void show(String number) {
// if (!TextUtils.isEmpty(number)) {
// mNameView.setText(number);
// }
mVideoView.setVideoPath(VideoDBHelper.getInstance().getSelectVideo(mContext, number));
mAcceptView.setVisible();
mEndCallView.setVisible();
......
......@@ -5,15 +5,12 @@ import android.os.Bundle
import android.text.TextUtils
import android.view.View
import cn.jzvd.Jzvd
import cn.sharesdk.wechat.friends.Wechat
import com.dingmouren.videowallpaper.VideoWallpaper
import com.downloader.Error
import com.downloader.OnDownloadListener
import com.downloader.PRDownloader
import com.mints.goodmoney.R
import com.mints.goodmoney.ad.vedio.VedioAdingManager
import com.mints.goodmoney.call.detail.DetailActivity
import com.mints.goodmoney.call.util.Util
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.VedioAdingBean
......@@ -21,7 +18,6 @@ import com.mints.goodmoney.mvp.presenters.KylVedioPresenter
import com.mints.goodmoney.mvp.views.KylVedioView
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.utils.CacheUtil
import com.mints.goodmoney.utils.LogUtil
import com.mints.goodmoney.utils.MD5
import com.tbruyelle.rxpermissions.RxPermissions
import kotlinx.android.synthetic.main.activity_kyl_vedio.*
......@@ -43,7 +39,6 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
private lateinit var vedioAdingManager: VedioAdingManager
private var loadVedioFailCount = 0
private val videoWallpaper by lazy { VideoWallpaper() }
private var downloadId: Int = -1//vedio下载id
private var downloadVedioSucFlag = false// 下载视频成功
......@@ -81,7 +76,7 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
override fun onBackPressed() {
if (Jzvd.backPress()) {
return;
return
}
super.onBackPressed()
}
......@@ -127,7 +122,7 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
.request(Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE)
.subscribe { granted: Boolean ->
if (granted) {
// downloadVedioToCacheFile()
downloadVedioToCacheFile()
} else {
showMissingPermissionDialog("存储")
}
......@@ -150,15 +145,19 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
.build()
.start(object : OnDownloadListener {
override fun onDownloadComplete() {
hideLoading()
runOnUiThread {
hideLoading()
// downloadVedioSucFlag = true
val vedioName = vedioPath + vedioName
DetailActivity.startSelf(this@KylVedioActivity, vedioName)
val vedioName = vedioPath + vedioName
DetailActivity.startSelf(this@KylVedioActivity, vedioName)
}
}
override fun onError(error: Error) {
showToast("加载失败")
hideLoading()
runOnUiThread {
showToast("加载失败")
hideLoading()
}
}
})
}
......
......@@ -25,7 +25,7 @@ class KylPageAdapter(val kylPageList: MutableList<KylBean.Data>) :
companion object {
const val HOLDER_TYPE_KYL = 0
const val HOLDER_TYPE_CSJAD = 1
const val HOLDER_TYPE_CSJAD = 0
}
lateinit var context: Context
......
......@@ -6,10 +6,10 @@
<com.mints.goodmoney.call.widget.CustomVideoView
android:id="@+id/video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true" />
android:layout_height="match_parent" />
<TextView
android:visibility="gone"
android:id="@+id/set_show_tv"
android:layout_width="match_parent"
android:layout_height="40dp"
......
......@@ -18,9 +18,9 @@
<TextView
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="150dp"
android:layout_marginLeft="100dp"
android:layout_marginTop="100dp"
android:layout_marginRight="150dp"
android:layout_marginRight="100dp"
android:layout_marginBottom="10dp"
android:background="@drawable/shape_tv_gold"
android:gravity="center"
......
......@@ -18,7 +18,7 @@
android:layout_alignParentTop="true"
android:layout_marginTop="50dp"
android:gravity="center"
android:text="unknown_contract"
android:text="未知来电"
android:textColor="#AA99AA"
android:textSize="35sp"
android:textStyle="bold" />
......
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