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
9db6f784
Commit
9db6f784
authored
Dec 30, 2019
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防止连击
parent
aa52679c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
CollectInfoStyleAdapter.kt
m-im/src/main/java/com/yidianling/uikit/business/session/view/CollectInfoStyleAdapter.kt
+5
-0
CollectUserInformationView.kt
m-im/src/main/java/com/yidianling/uikit/business/session/view/CollectUserInformationView.kt
+30
-0
No files found.
m-im/src/main/java/com/yidianling/uikit/business/session/view/CollectInfoStyleAdapter.kt
View file @
9db6f784
...
...
@@ -5,6 +5,7 @@ import android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.widget.TextView
import
com.ydl.ydlcommon.utils.Utils
import
com.yidianling.im.R
/**
...
...
@@ -26,6 +27,10 @@ class CollectInfoStyleAdapter(var list: List<String>, var event: (title: String)
override
fun
onBindViewHolder
(
holder
:
InfoStyleHolder
?,
position
:
Int
)
{
holder
!!
.
bindData
(
list
[
position
])
holder
.
itemView
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
event
(
list
[
position
])
}
}
...
...
m-im/src/main/java/com/yidianling/uikit/business/session/view/CollectUserInformationView.kt
View file @
9db6f784
...
...
@@ -18,6 +18,7 @@ import android.widget.EditText
import
android.widget.LinearLayout
import
android.widget.ScrollView
import
android.widget.TextView
import
com.ydl.ydlcommon.utils.Utils
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
...
...
@@ -54,6 +55,10 @@ class CollectUserInformationView(var mContext: Context, var skipEvent: () -> Uni
orientation
=
VERTICAL
tv_skip
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
showSkipDialog
()
}
}
...
...
@@ -70,6 +75,11 @@ class CollectUserInformationView(var mContext: Context, var skipEvent: () -> Uni
private
fun
proceedNext
(
list
:
List
<
UserQuestInfoBean
>)
{
tv_start
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
addContentView
(
resultInfoList
[
1
].
question
!!
,
true
)
tv_start
.
visibility
=
View
.
GONE
...
...
@@ -78,6 +88,10 @@ class CollectUserInformationView(var mContext: Context, var skipEvent: () -> Uni
tv_gender_male
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
addContentView
(
tv_gender_male
.
text
.
toString
(),
false
)
tv_gender_male
.
postDelayed
({
genderStr
=
"性别:男"
...
...
@@ -87,6 +101,10 @@ class CollectUserInformationView(var mContext: Context, var skipEvent: () -> Uni
},
300
)
}
tv_gender_fomale
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
addContentView
(
tv_gender_fomale
.
text
.
toString
(),
false
)
tv_gender_fomale
.
postDelayed
({
genderStr
=
"性别:女"
...
...
@@ -109,6 +127,10 @@ class CollectUserInformationView(var mContext: Context, var skipEvent: () -> Uni
}
date_pick
.
maxDate
=
Calendar
.
getInstance
().
timeInMillis
tv_age_ensure
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
ageStr
=
"年龄:${(Calendar.getInstance().get(Calendar.YEAR) - year)}岁"
addContentView
(
"${year}年"
,
false
)
...
...
@@ -145,6 +167,10 @@ class CollectUserInformationView(var mContext: Context, var skipEvent: () -> Uni
}
tv_send
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
val
content
=
et_input
.
text
.
trim
().
toString
()
if
(
TextUtils
.
isEmpty
(
content
))
{
ToastUtil
.
toastShort
(
"请输入内容"
)
...
...
@@ -161,6 +187,10 @@ class CollectUserInformationView(var mContext: Context, var skipEvent: () -> Uni
}
tv_finish
.
setOnClickListener
{
if
(
Utils
.
isFastClick
())
{
//防止连击
return
@setOnClickListener
}
val
resultContent
=
ageStr
+
"\n"
+
genderStr
+
"\n"
+
questionStyleStr
+
"\n"
+
questionStr
val
genderBean
=
UserQuestInfoBean
(
list
[
1
].
userInfoType
,
""
,
ArrayList
(),
genderStr
.
split
(
":"
)[
1
])
...
...
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