1.在解绑提示页面,增加提示语“Auto-Renew: Cancel”
2.适配Google Play 要求支持 16 KB 的内存页面大小,更新大部分第三方库到最新版本
This commit is contained in:
@@ -17,7 +17,8 @@ class DFUNewDialog(context: Context) :
|
||||
private var mVersion = ""
|
||||
|
||||
override fun initView() {
|
||||
setCanceledOnTouchOutside(false)
|
||||
// setCanceledOnTouchOutside(false)
|
||||
setCancelable(false)
|
||||
mViewBinding.apply {
|
||||
btnDialogDfuNewUpgradeNow.setChangeAlphaWhenPress(true)
|
||||
setOnClickListenerViews(tvDialogDfuNewLaterBtn, btnDialogDfuNewDone)
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.abbidot.tracker.base.BaseActivity
|
||||
import com.abbidot.tracker.base.BaseDialog
|
||||
import com.abbidot.tracker.constant.GetResultCallback
|
||||
import com.abbidot.tracker.databinding.ActivityEmailAddressBinding
|
||||
import com.abbidot.tracker.util.Util
|
||||
import com.abbidot.tracker.util.ViewUtil
|
||||
import com.abbidot.tracker.vm.UserProfileViewModel
|
||||
|
||||
@@ -25,7 +26,7 @@ class EmailAddressActivity :
|
||||
setTopBarTitle(R.string.txt_email_address)
|
||||
|
||||
mViewBinding.apply {
|
||||
setOnClickListenerViews(btnEmailAddressChange)
|
||||
setOnClickListenerViews(btnEmailAddressChange, tvEmailAddressShow)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +67,9 @@ class EmailAddressActivity :
|
||||
mViewBinding.apply {
|
||||
when (v!!) {
|
||||
btnEmailAddressChange -> startChange()
|
||||
tvEmailAddressShow -> Util.copyToClipboard(
|
||||
mContext, tvEmailAddressShow.text.toString()
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.abbidot.tracker.util
|
||||
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.PackageManager
|
||||
@@ -858,6 +860,16 @@ class Util {
|
||||
}
|
||||
return isControl
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制内容到剪贴板
|
||||
*/
|
||||
fun copyToClipboard(context: Context, text: String) {
|
||||
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
val clip = ClipData.newPlainText("text", text)
|
||||
clipboard.setPrimaryClip(clip)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@ import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import java.io.File
|
||||
import androidx.core.net.toUri
|
||||
|
||||
|
||||
/**
|
||||
@@ -41,7 +42,7 @@ class DownLoadFileViewModel : ViewModel() {
|
||||
file.delete()
|
||||
}
|
||||
mDownloadManager = context.getSystemService(DOWNLOAD_SERVICE) as DownloadManager
|
||||
val uri: Uri = Uri.parse(downloadUrl)
|
||||
val uri = downloadUrl.toUri()
|
||||
val request = DownloadManager.Request(uri)
|
||||
//设置文件类型
|
||||
request.setMimeType("zip/*")
|
||||
@@ -105,9 +106,7 @@ class DownLoadFileViewModel : ViewModel() {
|
||||
LogUtil.i(path)
|
||||
}
|
||||
val dfuStateBean = DFUStateBean(
|
||||
context.getString(R.string.txt_down_firmware),
|
||||
progress.toInt(),
|
||||
path
|
||||
context.getString(R.string.txt_down_firmware), progress.toInt(), path
|
||||
)
|
||||
mDownloadProgressLiveData.postValue(dfuStateBean)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user