Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_flowbox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_flowbox
Commits
4969f74e
Commit
4969f74e
authored
Jul 29, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注销功能优化
parent
9fb6febd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
SettingsActivity.kt
...n/java/com/mints/flowbox/ui/activitys/SettingsActivity.kt
+14
-0
No files found.
app/src/main/java/com/mints/flowbox/ui/activitys/SettingsActivity.kt
View file @
4969f74e
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment