Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
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
杨凯
YDL-Component-Medical
Commits
6488b095
Commit
6488b095
authored
Mar 10, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
隐私弹窗样式
parent
f3676a75
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
252 additions
and
41 deletions
+252
-41
MainActivity.kt
app/src/main/java/com/ydl/component/MainActivity.kt
+73
-33
config.gradle
config.gradle
+1
-1
SecretDescriptionDialog.kt
m-user/src/main/java/com/yidianling/user/widget/SecretDescriptionDialog.kt
+6
-7
user_activity_secret.xml
m-user/src/main/res/layout/user_activity_secret.xml
+0
-0
user_dialog_secret.xml
m-user/src/main/res/layout/user_dialog_secret.xml
+172
-0
No files found.
app/src/main/java/com/ydl/component/MainActivity.kt
View file @
6488b095
package
com.ydl.component
//import com.ydl.confide.home.ConfideHomeActivity
//import com.ydl.confide.home.ConfideHomeActivity
//import com.yidianling.consultant.ExpertSearchActivity.Companion.HOT_SEARCH_DOCTOR_NAME
//import com.yidianling.consultant.api.IConsultantService
import
android.Manifest
import
android.annotation.SuppressLint
import
android.content.ComponentName
...
...
@@ -9,6 +12,7 @@ import android.content.Intent
import
android.content.ServiceConnection
import
android.net.Uri
import
android.os.IBinder
import
android.os.Process
import
android.provider.Settings
import
android.util.Log
import
com.alibaba.android.arouter.facade.annotation.Route
...
...
@@ -18,21 +22,17 @@ import com.umeng.analytics.MobclickAgent
import
com.ydl.component.music.FragmentContainerActivity
import
com.ydl.component.mvp.DemoContract
import
com.ydl.component.mvp.DemoPresenter
//import com.ydl.confide.home.ConfideHomeActivity
import
com.ydl.media.audio.PlayService
import
com.ydl.ydl_router.manager.YDLRouterManager
import
com.ydl.ydl_router.manager.YDLRouterParams
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.
router.IYDLRouterConstant
import
com.ydl.ydlcommon.
utils.ActivityManager.Companion.finishAll
import
com.yidianling.common.tools.ToastUtil
//import com.yidianling.consultant.ExpertSearchActivity.Companion.HOT_SEARCH_DOCTOR_NAME
//import com.yidianling.consultant.api.IConsultantService
import
com.yidianling.fm.api.service.IFMService
import
com.yidianling.tests.home.NewTestHomeActivity
import
com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import
com.yidianling.user.widget.SecretDescriptionDialog
import
com.yidianling.user.widget.SecretDescriptionDialog.OnSecretDescriptionDialogListener
import
com.yidianling.user.widget.SecretDialog
import
com.yidianling.user.widget.SecretDialog.OnSecretDialogListener
import
kotlinx.android.synthetic.main.activity_main.*
/**
...
...
@@ -42,8 +42,9 @@ import kotlinx.android.synthetic.main.activity_main.*
@Route
(
path
=
"/main/main"
)
class
MainActivity
:
BaseLceActivity
<
DemoContract
.
View
,
DemoContract
.
Presenter
>(),
DemoContract
.
View
{
private
var
secretDescriptionDialog
:
SecretDescriptionDialog
?
=
null
private
var
serviceConnection
:
ServiceConnection
?
=
null
private
var
secretDialog
:
SecretDialog
?
=
null
protected
var
playService
:
PlayService
?
=
null
override
fun
getContentViewId
():
Int
{
...
...
@@ -107,18 +108,35 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
FragmentContainerActivity
.
start
(
this
,
"TrendsHomeFragment"
)
}
bt_to_tests
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
NewTestHomeActivity
::
class
.
java
))
// startActivity(Intent(this, NewTestHomeActivity::class.java))
// SecretActivity.Companion.startProtocol(this, it.data.getContent());
secretDescriptionDialog
=
SecretDescriptionDialog
(
this
@MainActivity
,
"122342453653456345674356"
,
object
:
OnSecretDescriptionDialogListener
{
override
fun
onCancel
()
{
secretDescriptionDialog
!!
.
dismiss
()
showEnsureDialog
()
}
override
fun
onSure
()
{
secretDescriptionDialog
!!
.
dismiss
()
}
})
secretDescriptionDialog
!!
.
setCanceledOnTouchOutside
(
false
)
secretDescriptionDialog
!!
.
show
()
}
bt_to_collect_info
.
setOnClickListener
{
startActivity
(
Intent
(
this
,
CollectSexAndBirthActivity
::
class
.
java
))
}
bt_to_confide
.
setOnClickListener
{
// YDLavManager.instances.login("1193016")
// YDLavManager.instances.login("1193016")
// startActivity(Intent(this, ConfideHomeActivity::class.java))
}
bt_to_muse
.
setOnClickListener
{
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_MUSE_CENTER,
// YDLRouterManager.router(IYDLRouterConstant.ROUTER_MUSE_CENTER,
// YDLRouterParams().putExtra
// ("url", "http://video.yidianling.com/2019/05/30/746851e2f335baf5f44499f4fb49d3a9.mp3"))
...
...
@@ -165,29 +183,33 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
bt_to_test
.
setOnClickListener
{
val
dialog
=
SecretDescriptionDialog
(
this
@MainActivity
,
"感谢您信任并使用壹点灵APP,\\n\n"
+
"我们深知个人隐私的重要性,为了您更好的使用本APP,希望您着重关注:\\n\\n1. 为向您提供交易相关基本功能,我们会收集、使用必要的信息;\\n\n"
+
"2. 基于您的明示授权,我们可能会获取您的位置(为您提供附近的咨询师等)、设备号信息(以保障您账号与交易安全)等信息,您有权拒绝或取消授权;\\n\n"
+
"3. 我们会采业界先进的安全措施保护您的信息安全;\\n\n"
+
"4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\\n\n"
+
"5. 您可以查询、更正、删除您的个人信息。"
,
object
:
SecretDescriptionDialog
.
OnSecretDescriptionDialogListener
{
override
fun
onCancel
()
{
val
secretDialog
=
SecretDialog
(
this
@MainActivity
,
object
:
SecretDialog
.
OnSecretDialogListener
{
override
fun
onCancel
()
{
ToastUtil
.
toastShort
(
"onCancel"
)
}
override
fun
onSure
()
{
ToastUtil
.
toastShort
(
"nextStep"
)
}
})
secretDialog
?.
show
()
val
dialog
=
SecretDescriptionDialog
(
this
@MainActivity
,
"感谢您信任并使用壹点灵APP,\\n\n"
+
"我们深知个人隐私的重要性,为了您更好的使用本APP,希望您着重关注:\\n\\n1. 为向您提供交易相关基本功能,我们会收集、使用必要的信息;\\n\n"
+
"2. 基于您的明示授权,我们可能会获取您的位置(为您提供附近的咨询师等)、设备号信息(以保障您账号与交易安全)等信息,您有权拒绝或取消授权;\\n\n"
+
"3. 我们会采业界先进的安全措施保护您的信息安全;\\n\n"
+
"4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\\n\n"
+
"5. 您可以查询、更正、删除您的个人信息。"
,
object
:
SecretDescriptionDialog
.
OnSecretDescriptionDialogListener
{
override
fun
onCancel
()
{
val
secretDialog
=
SecretDialog
(
this
@MainActivity
,
object
:
SecretDialog
.
OnSecretDialogListener
{
override
fun
onCancel
()
{
ToastUtil
.
toastShort
(
"onCancel"
)
}
override
fun
onSure
()
{
ToastUtil
.
toastShort
(
"nextStep"
)
}
})
secretDialog
?.
show
()
}
override
fun
onSure
()
{
ToastUtil
.
toastShort
(
"nextStep"
)
}
}
override
fun
onSure
()
{
ToastUtil
.
toastShort
(
"nextStep"
)
}
}
)
dialog
.
show
()
}
...
...
@@ -264,4 +286,22 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
}
private
fun
showEnsureDialog
()
{
secretDialog
=
SecretDialog
(
this
,
object
:
OnSecretDialogListener
{
override
fun
onCancel
()
{
secretDialog
!!
.
dismiss
()
// finishAll()
// Process.killProcess(Process.myPid())
// System.exit(0)
}
override
fun
onSure
()
{
secretDialog
!!
.
dismiss
()
}
})
secretDialog
!!
.
setCanceledOnTouchOutside
(
false
)
secretDialog
!!
.
show
()
}
}
config.gradle
View file @
6488b095
ext
{
kotlin_version
=
"1.3.21"
dev_mode
=
fals
e
dev_mode
=
tru
e
ydl_app
=
[
appName
:
"心理咨询壹点灵"
,
...
...
m-user/src/main/java/com/yidianling/user/widget/SecretDescriptionDialog.kt
View file @
6488b095
...
...
@@ -10,7 +10,6 @@ import android.text.Spanned
import
android.text.TextPaint
import
android.text.method.LinkMovementMethod
import
android.text.style.ClickableSpan
import
android.text.style.ForegroundColorSpan
import
android.view.Gravity
import
android.view.View
import
android.view.WindowManager
...
...
@@ -18,7 +17,7 @@ import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.Utils
import
com.yidianling.user.R
import
com.yidianling.user.ui.login.H5Activity
import
kotlinx.android.synthetic.main.user_
activity
_secret.*
import
kotlinx.android.synthetic.main.user_
dialog
_secret.*
class
SecretDescriptionDialog
(
...
...
@@ -30,7 +29,7 @@ class SecretDescriptionDialog(
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
user_
activity
_secret
)
setContentView
(
R
.
layout
.
user_
dialog
_secret
)
val
params
=
window
.
attributes
params
.
width
=
WindowManager
.
LayoutParams
.
MATCH_PARENT
...
...
@@ -65,14 +64,14 @@ class SecretDescriptionDialog(
spannableString
.
setSpan
(
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
?)
{
if
(
Utils
.
isFastClick
()){
if
(
Utils
.
isFastClick
())
{
return
}
H5Activity
.
start
(
mContext
,
false
)
}
override
fun
updateDrawState
(
ds
:
TextPaint
?)
{
ds
?.
color
=
Color
.
parseColor
(
"#159CEF"
)
ds
?.
color
=
Color
.
parseColor
(
"#159CEF"
)
}
},
5
,
13
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
...
...
@@ -80,14 +79,14 @@ class SecretDescriptionDialog(
spannableString
.
setSpan
(
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
?)
{
if
(
Utils
.
isFastClick
()){
if
(
Utils
.
isFastClick
())
{
return
}
H5Activity
.
start
(
mContext
,
true
)
}
override
fun
updateDrawState
(
ds
:
TextPaint
?)
{
ds
?.
color
=
Color
.
parseColor
(
"#159CEF"
)
ds
?.
color
=
Color
.
parseColor
(
"#159CEF"
)
}
},
str
.
length
-
8
,
str
.
length
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
...
...
m-user/src/main/res/layout/user_activity_secret.xml
View file @
6488b095
This diff is collapsed.
Click to expand it.
m-user/src/main/res/layout/user_dialog_secret.xml
0 → 100644
View file @
6488b095
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:myapp=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:layout_marginLeft=
"34dp"
android:layout_marginRight=
"34dp"
android:background=
"@drawable/user_secret_dialog_bg"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<com.ydl.ydlcommon.view.widgets.RoundImageView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
myapp:pa_borderRadius=
"12dp"
myapp:pa_type=
"pa_round"
android:adjustViewBounds=
"true"
android:src=
"@drawable/user_secret_top_bg"
/>
<RelativeLayout
android:id=
"@+id/user_top_rl"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
>
<TextView
android:id=
"@+id/secrey_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"25dp"
android:layout_marginTop=
"40dp"
android:text=
"隐私政策"
android:textColor=
"#242424"
android:textSize=
"28dp"
android:textStyle=
"bold"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/secrey_title"
android:layout_marginLeft=
"25dp"
android:text=
"及使用协议说明"
android:textColor=
"#242424"
android:textSize=
"28dp"
android:textStyle=
"bold"
/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"194dp"
>
<ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"194dp"
android:scrollbars=
"none"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"25dp"
android:layout_marginRight=
"25dp"
>
<TextView
android:id=
"@+id/user_secret_desc"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30dp"
android:lineHeight=
"20dp"
tools:text=
"感谢您信任并使用壹点灵APP,\n
我们深知个人隐私的重要性,为了您更好的使用本APP,希望您着重关注:\n\n1. 为向您提供交易相关基本功能,我们会收集、使用必要的信息;\n
2. 基于您的明示授权,我们可能会获取您的位置(为您提供附近的咨询师等)、设备号信息(以保障您账号与交易安全)等信息,您有权拒绝或取消授权;\n
3. 我们会采业界先进的安全措施保护您的信息安全;\n
4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\n
5. 您可以查询、更正、删除您的个人信息。"
android:textColor=
"#444444"
android:textSize=
"14dp"
/>
</RelativeLayout>
</ScrollView>
<View
android:background=
"@drawable/user_secret_dectription_bg"
android:layout_alignParentBottom=
"true"
android:layout_width=
"match_parent"
android:layout_height=
"30dp"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_content"
android:layout_marginTop=
"15dp"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"25dp"
android:layout_marginRight=
"25dp"
android:text=
"阅读完整版《用户使用协议》、《隐私保护政策》"
android:textColor=
"#444444"
android:textSize=
"14dp"
/>
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="阅读完整版"-->
<!--android:textColor="#444444"-->
<!--android:textSize="14dp"/>-->
<!--<TextView-->
<!--android:id="@+id/user_use_btn"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="《用户使用协议》"-->
<!--android:textColor="#159CEF"-->
<!--android:textSize="14dp"/>-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="、"-->
<!--android:textColor="#444444"-->
<!--android:textSize="14dp"/>-->
<!--<TextView-->
<!--android:id="@+id/user_secret_protect_btn"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="《隐私保护政策》"-->
<!--android:textColor="#159CEF"-->
<!--android:textSize="14dp"/>-->
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"24dp"
android:layout_alignParentBottom=
"true"
android:layout_marginLeft=
"25dp"
android:layout_marginRight=
"25dp"
android:orientation=
"vertical"
android:background=
"#ffffff"
>
<TextView
android:id=
"@+id/user_secret_agree"
android:layout_width=
"match_parent"
android:layout_height=
"44dp"
android:layout_weight=
"1"
android:background=
"@drawable/user_secret_right_btn_bg"
android:gravity=
"center"
android:text=
"同意并继续"
android:textColor=
"#FFFFFF"
android:textSize=
"16dp"
/>
<TextView
android:id=
"@+id/user_secret_no_agree"
android:layout_width=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"仍不同意并退出"
android:textColor=
"#999999"
android:textSize=
"16dp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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