Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_fairyland_pro
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_fairyland_pro
Commits
10e5860a
Commit
10e5860a
authored
Mar 20, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
de953559
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
MainMyAdapter.kt
...main/java/com/mints/fairyland/ui/adapter/MainMyAdapter.kt
+12
-9
No files found.
app/src/main/java/com/mints/fairyland/ui/adapter/MainMyAdapter.kt
View file @
10e5860a
...
...
@@ -103,6 +103,7 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
// 金币
holder
.
itemTaskMoney
.
text
=
" "
+
taskBean
.
baseConfig
.
coinText
// holder.itemTaskImg.setImageDrawable(mContext.resources.getDrawable(taskBean.imageSrc))
if
(
taskBean
.
baseConfig
.
buttonText
==
null
)
{
holder
.
itemTaskClick
.
visibility
=
View
.
GONE
}
else
{
...
...
@@ -140,26 +141,28 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
}
}
// 进度条
//
otherConfig - 进度
进度条
if
(
taskBean
.
otherConfig
!=
null
)
{
if
(
taskBean
.
baseConfig
!=
null
&&
taskBean
.
otherConfig
.
max
!=
0
)
{
// 判断进度最大值>0 展示进度和绿值
if
(
taskBean
.
otherConfig
.
max
>
0
)
{
holder
.
itemTaskPb
.
visibility
=
View
.
VISIBLE
holder
.
itemTaskPb
.
max
=
taskBean
.
otherConfig
.
max
holder
.
itemTaskPb
.
progress
=
taskBean
.
otherConfig
.
complete
// 展示进度条绿字
if
(
taskBean
.
baseConfig
!=
null
&&
taskBean
.
baseConfig
.
runingText
!=
null
)
{
holder
.
itemTaskProgress
.
visibility
=
View
.
VISIBLE
holder
.
itemTaskProgress
.
text
=
taskBean
.
baseConfig
.
runingText
}
}
else
{
holder
.
itemTaskPb
.
visibility
=
View
.
GONE
holder
.
itemTaskProgress
.
visibility
=
View
.
GONE
}
}
else
{
holder
.
itemTaskProgress
.
visibility
=
View
.
GONE
holder
.
itemTaskPb
.
visibility
=
View
.
GONE
}
if
(
taskBean
.
baseConfig
.
runingText
!=
null
)
{
holder
.
itemTaskProgress
.
visibility
=
View
.
VISIBLE
holder
.
itemTaskProgress
.
text
=
taskBean
.
baseConfig
.
runingText
}
else
{
holder
.
itemTaskProgress
.
visibility
=
View
.
GONE
}
}
}
...
...
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