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
9fb6febd
Commit
9fb6febd
authored
Jul 29, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置页添加注销功能
parent
7509c069
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
13 deletions
+62
-13
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+6
-6
InitAppService.kt
app/src/main/java/com/mints/flowbox/InitAppService.kt
+0
-2
MainActivity.kt
.../main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
+2
-0
SettingsActivity.kt
...n/java/com/mints/flowbox/ui/activitys/SettingsActivity.kt
+46
-5
CustomDialogAsApple.java
.../mints/flowbox/ui/widgets/dialog/CustomDialogAsApple.java
+4
-0
activity_settings.xml
app/src/main/res/layout/activity_settings.xml
+4
-0
bg_red_bag.png
app/src/main/res/mipmap-xhdpi/bg_red_bag.png
+0
-0
icon_settings_cancel.png
app/src/main/res/mipmap-xhdpi/icon_settings_cancel.png
+0
-0
No files found.
app/src/main/AndroidManifest.xml
View file @
9fb6febd
...
@@ -156,17 +156,17 @@
...
@@ -156,17 +156,17 @@
<activity
<activity
android:name=
".ui.activitys.Increasespeed2Activity"
android:name=
".ui.activitys.Increasespeed2Activity"
android:
launchMode=
"singleTop
"
android:
excludeFromRecents=
"true
"
android:
excludeFromRecents=
"true
"
/>
android:
launchMode=
"singleTop
"
/>
<activity
<activity
android:name=
".ui.activitys.IncreasespeedActivity"
android:name=
".ui.activitys.IncreasespeedActivity"
android:
launchMode=
"singleTop
"
android:
excludeFromRecents=
"true
"
android:
excludeFromRecents=
"true
"
/>
android:
launchMode=
"singleTop
"
/>
<activity
<activity
android:name=
".ui.activitys.CleanActivity"
android:name=
".ui.activitys.CleanActivity"
android:
launchMode=
"singleTop
"
android:
excludeFromRecents=
"true
"
android:
excludeFromRecents=
"true
"
/>
android:
launchMode=
"singleTop
"
/>
<activity
<activity
android:name=
".ui.activitys.keepalive.ScreenActivity"
android:name=
".ui.activitys.keepalive.ScreenActivity"
...
...
app/src/main/java/com/mints/flowbox/InitAppService.kt
View file @
9fb6febd
...
@@ -61,8 +61,6 @@ class InitAppService : IntentService("InitializeService") {
...
@@ -61,8 +61,6 @@ class InitAppService : IntentService("InitializeService") {
// PR下载附件
// PR下载附件
initPRDownloader
()
initPRDownloader
()
// 一览视频
YlVideoManager
.
init
(
MintsApplication
.
getContext
())
}
}
/**
/**
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/MainActivity.kt
View file @
9fb6febd
...
@@ -63,6 +63,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -63,6 +63,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_main
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_main
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
// 一览视频
YlVideoManager
.
init
(
MintsApplication
.
getContext
())
WifiStateManager
.
instance
.
registerWifiReceiver
(
this
)
WifiStateManager
.
instance
.
registerWifiReceiver
(
this
)
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/SettingsActivity.kt
View file @
9fb6febd
...
@@ -2,6 +2,8 @@ package com.mints.flowbox.ui.activitys
...
@@ -2,6 +2,8 @@ package com.mints.flowbox.ui.activitys
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Dialog
import
android.app.Dialog
import
android.content.Intent
import
android.net.Uri
import
android.os.Bundle
import
android.os.Bundle
import
android.view.View
import
android.view.View
import
android.widget.ImageView
import
android.widget.ImageView
...
@@ -22,6 +24,7 @@ import com.mints.flowbox.ui.activitys.base.BaseActivity
...
@@ -22,6 +24,7 @@ import com.mints.flowbox.ui.activitys.base.BaseActivity
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
import
com.mints.flowbox.ui.widgets.dialog.DialogListener
import
com.mints.flowbox.ui.widgets.dialog.DialogUtils
import
com.mints.flowbox.ui.widgets.dialog.DialogUtils
import
com.mints.flowbox.utils.CacheUtil
import
com.mints.flowbox.utils.CacheUtil
import
com.mints.flowbox.utils.SpanUtils
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_settings.*
import
kotlinx.android.synthetic.main.activity_settings.*
...
@@ -59,10 +62,6 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
...
@@ -59,10 +62,6 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
@SuppressLint
(
"CutPasteId"
)
@SuppressLint
(
"CutPasteId"
)
private
fun
initLayout
()
{
private
fun
initLayout
()
{
if
(!
userManager
.
userIsLogin
())
{
btn_switch
.
visibility
=
View
.
GONE
}
tv_title
.
text
=
"设置"
tv_title
.
text
=
"设置"
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
...
@@ -75,6 +74,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
...
@@ -75,6 +74,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
item_privacyAgree
.
setOnClickListener
(
this
)
item_privacyAgree
.
setOnClickListener
(
this
)
item_aboutUs
.
setOnClickListener
(
this
)
item_aboutUs
.
setOnClickListener
(
this
)
item_feedBack
.
setOnClickListener
(
this
)
item_feedBack
.
setOnClickListener
(
this
)
item_cancel
.
setOnClickListener
(
this
)
btn_switch
.
setOnClickListener
(
this
)
btn_switch
.
setOnClickListener
(
this
)
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
text
=
"手机号"
item_phone
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
text
=
"手机号"
...
@@ -154,6 +154,19 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
...
@@ -154,6 +154,19 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
.
setCompoundDrawables
(
feedBack
,
null
,
null
,
null
)
.
setCompoundDrawables
(
feedBack
,
null
,
null
,
null
)
item_feedBack
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
GONE
item_feedBack
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
GONE
item_feedBack
.
findViewById
<
ImageView
>(
R
.
id
.
iv_right
).
visibility
=
View
.
VISIBLE
item_feedBack
.
findViewById
<
ImageView
>(
R
.
id
.
iv_right
).
visibility
=
View
.
VISIBLE
item_cancel
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
).
text
=
"注销账号"
val
cancel
=
ContextCompat
.
getDrawable
(
this
,
R
.
mipmap
.
icon_settings_cancel
)
cancel
?.
setBounds
(
0
,
0
,
56
,
56
)
item_cancel
.
findViewById
<
TextView
>(
R
.
id
.
tv_title
)
.
setCompoundDrawables
(
cancel
,
null
,
null
,
null
)
item_cancel
.
findViewById
<
TextView
>(
R
.
id
.
tv_right
).
visibility
=
View
.
GONE
item_cancel
.
findViewById
<
ImageView
>(
R
.
id
.
iv_right
).
visibility
=
View
.
VISIBLE
if
(!
userManager
.
userIsLogin
())
{
item_cancel
.
visibility
=
View
.
GONE
btn_switch
.
visibility
=
View
.
GONE
}
}
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_settings
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_settings
...
@@ -176,7 +189,6 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
...
@@ -176,7 +189,6 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
}
}
R
.
id
.
item_wechat
->
{
R
.
id
.
item_wechat
->
{
if
(
userManager
.
wxOpenid
.
isEmpty
())
{
if
(
userManager
.
wxOpenid
.
isEmpty
())
{
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
val
wechat
=
ShareSDK
.
getPlatform
(
Wechat
.
NAME
)
if
(!
wechat
.
isClientValid
)
{
if
(!
wechat
.
isClientValid
)
{
showToast
(
"请先安装微信"
)
showToast
(
"请先安装微信"
)
...
@@ -215,7 +227,35 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
...
@@ -215,7 +227,35 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
R
.
id
.
item_feedBack
->
{
R
.
id
.
item_feedBack
->
{
readyGo
(
FeedbackActivity
::
class
.
java
)
readyGo
(
FeedbackActivity
::
class
.
java
)
}
}
R
.
id
.
item_cancel
->
{
cancelAccount
()
}
}
}
}
private
fun
cancelAccount
()
{
val
address
=
"dev_support@tech-mints.cn"
DialogUtils
.
showDialog
(
this
,
SpanUtils
()
.
append
(
"注销账户请发送邮件到\n"
)
.
append
(
address
)
.
setForegroundColor
(
resources
.
getColor
(
R
.
color
.
color_main
))
.
create
(),
"提示"
,
"确定"
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
dialog
?.
dismiss
()
val
uri
=
Uri
.
parse
(
"mailto:$address"
)
val
data
=
Intent
(
Intent
.
ACTION_SENDTO
,
uri
)
data
.
putExtra
(
Intent
.
EXTRA_EMAIL
,
address
)
data
.
putExtra
(
Intent
.
EXTRA_SUBJECT
,
"申请注销账户"
)
data
.
putExtra
(
Intent
.
EXTRA_TEXT
,
"申请注销账户ID:\n申请注销账户微信号:\n申请注销账户手机号:\n"
)
startActivity
(
Intent
.
createChooser
(
data
,
"选择邮箱"
))
}
})
}
}
private
fun
backDialog
()
{
private
fun
backDialog
()
{
...
@@ -226,6 +266,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
...
@@ -226,6 +266,7 @@ class SettingsActivity : BaseActivity(), View.OnClickListener, OnLoginListener,
"确定"
,
"确定"
,
object
:
DialogListener
()
{
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
dialog
?.
dismiss
()
UserManager
.
getInstance
().
userLogout
()
UserManager
.
getInstance
().
userLogout
()
readyGoThenKill
(
MainActivity
::
class
.
java
)
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
...
...
app/src/main/java/com/mints/flowbox/ui/widgets/dialog/CustomDialogAsApple.java
View file @
9fb6febd
...
@@ -93,6 +93,10 @@ public class CustomDialogAsApple extends BaseDialog {
...
@@ -93,6 +93,10 @@ public class CustomDialogAsApple extends BaseDialog {
dialog_tv_content
.
setText
(
s
);
dialog_tv_content
.
setText
(
s
);
}
}
public
TextView
getContentTv
()
{
return
dialog_tv_content
;
}
/**
/**
* Dialog显示content文字
* Dialog显示content文字
*
*
...
...
app/src/main/res/layout/activity_settings.xml
View file @
9fb6febd
...
@@ -48,6 +48,10 @@
...
@@ -48,6 +48,10 @@
android:id=
"@+id/item_feedBack"
android:id=
"@+id/item_feedBack"
layout=
"@layout/item_settings"
/>
layout=
"@layout/item_settings"
/>
<include
android:id=
"@+id/item_cancel"
layout=
"@layout/item_settings"
/>
<Button
<Button
android:id=
"@+id/btn_switch"
android:id=
"@+id/btn_switch"
android:layout_width=
"200dp"
android:layout_width=
"200dp"
...
...
app/src/main/res/mipmap-xhdpi/bg_red_bag.png
View replaced file @
7509c069
View file @
9fb6febd
129 KB
|
W:
|
H:
111 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/mipmap-xhdpi/icon_settings_cancel.png
0 → 100644
View file @
9fb6febd
1.3 KB
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