Commit 4969f74e authored by jyx's avatar jyx

注销功能优化

parent 9fb6febd
......@@ -2,6 +2,9 @@ package com.mints.flowbox.ui.activitys
import android.annotation.SuppressLint
import android.app.Dialog
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
......@@ -11,6 +14,7 @@ import android.widget.TextView
import androidx.core.content.ContextCompat
import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat
import com.hjq.toast.ToastUtils
import com.mints.flowbox.R
import com.mints.flowbox.common.Constant
import com.mints.flowbox.login.LoginApi
......@@ -248,6 +252,10 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) {
dialog?.dismiss()
clipData(address)
ToastUtils.show("邮箱已经复制到您的剪切板上!")
val uri = Uri.parse("mailto:$address")
val data = Intent(Intent.ACTION_SENDTO, uri)
data.putExtra(Intent.EXTRA_EMAIL, address)
......@@ -258,6 +266,12 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
})
}
private fun clipData(str: String) {
val cm = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clipData = ClipData.newPlainText("Label", str)
cm.setPrimaryClip(clipData)
}
private fun backDialog() {
DialogUtils.showDialog(
this,
......
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