Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
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_vedio
Commits
b13b8fba
Commit
b13b8fba
authored
Sep 20, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
猜歌页优化RecyclerView复用问题,优化样式
parent
90f39517
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
36 deletions
+62
-36
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+25
-8
MyFragment.kt
.../main/java/com/duben/dayplaylet/ui/fragment/MyFragment.kt
+5
-13
shape_withdraw.xml
video/app/src/main/res/drawable/shape_withdraw.xml
+10
-0
shape_withdraw_half.xml
video/app/src/main/res/drawable/shape_withdraw_half.xml
+3
-1
dialog_drawcash.xml
video/app/src/main/res/layout/dialog_drawcash.xml
+4
-2
drama_activity_api_detail.xml
video/app/src/main/res/layout/drama_activity_api_detail.xml
+1
-1
fragment_draw.xml
video/app/src/main/res/layout/fragment_draw.xml
+4
-3
layout_draw_header.xml
video/app/src/main/res/layout/layout_draw_header.xml
+6
-6
media_layout_quiz.xml
video/app/src/main/res/layout/media_layout_quiz.xml
+4
-2
No files found.
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
b13b8fba
...
...
@@ -156,7 +156,7 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView {
return
}
RxBus
.
getDefault
().
post
(
MsgEvent
(
"
BUS_CHANGE_PAGE"
))
RxBus
.
getDefault
().
post
(
MsgEvent
(
"
"
+
map
[
"group_id"
]
))
mPos
=
position
LogUtil
.
d
(
TAG
,
"onDPPageChange: $position, map = $map"
)
...
...
@@ -251,6 +251,7 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView {
background
=
R
.
drawable
.
icon_quiz_button_error_bg
background2
=
R
.
drawable
.
icon_quiz_error
}
optionsList
[
i
].
setBackgroundResource
(
R
.
drawable
.
icon_quiz_button_bg
)
val
button
=
optionsList
[
i
]
if
(
i
==
0
)
{
option0
.
text
=
options
[
i
]
...
...
@@ -328,12 +329,13 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView {
}
override
fun
onNext
(
t
:
MsgEvent
)
{
if
(!
quizIvRedbox0
.
isClickable
)
return
if
(!
t
.
msg
.
equals
(
feedParamsForCallback
[
"group_id"
]))
return
for
(
i
in
optionsList
.
indices
)
{
val
right
=
answer
==
i
if
(
right
)
{
mMusicBean
?.
let
{
if
(
it
.
nextIsAd
)
{
if
(
it
.
nextIsAd
&&
optionsList
[
i
].
isClickable
)
{
if
(
i
==
0
)
{
quizIvRedbox0
.
visibility
=
View
.
VISIBLE
...
...
@@ -341,6 +343,11 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView {
quizIvRedbox1
.
visibility
=
View
.
VISIBLE
}
}
else
{
quizIvRedbox0
.
visibility
=
View
.
GONE
quizIvRedbox0
.
visibility
=
View
.
GONE
}
}
}
...
...
@@ -655,7 +662,8 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView {
if
(
canFail
)
return
showLoading
(
"正在获取视频"
,
false
)
NoPreAdManager
.
loadVideoAd
(
requireActivity
(),
carrierType
,
NoPreAdManager
.
loadVideoAd
(
requireActivity
(),
carrierType
,
object
:
AdStatusListener
{
override
fun
adFail
()
{
hideLoading
()
...
...
@@ -702,9 +710,12 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView {
rope
?.
stop
()
mTimer
=
null
rope
=
null
awardVideo
(
Constant
.
CARRIERTYPE_SONG_MORE
)
}
mTimer
=
CountDownTimerSupport
(
8000
,
1000
)
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
quizTvPop
.
text
=
String
.
format
(
"%2ds后消失"
,
...
...
@@ -870,10 +881,16 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView {
})
}
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?)
{
override
fun
onActivityResult
(
requestCode
:
Int
,
resultCode
:
Int
,
data
:
Intent
?
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
)
val
coin
=
data
?.
extras
?.
getInt
(
SongAwardActivity
.
SONG_REDPACKET
,
0
)
?:
0
val
di
=
data
?.
extras
?.
getInt
(
SongAwardActivity
.
SONG_YUANBAO
,
0
)
?:
0
val
coin
=
data
?.
extras
?.
getInt
(
SongAwardActivity
.
SONG_REDPACKET
,
0
)
?:
0
val
di
=
data
?.
extras
?.
getInt
(
SongAwardActivity
.
SONG_YUANBAO
,
0
)
?:
0
showRewardAnim
(
coin
,
di
)
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MyFragment.kt
View file @
b13b8fba
...
...
@@ -135,19 +135,6 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
override
fun
getUserSuc
(
data
:
UserBean
)
{
tv_my_id
.
text
=
"用户ID:${data.userMsg.idcode}"
tv_my_money
.
text
=
SpanUtils
()
.
append
(
FormatUtil
.
getCashFormaet
(
UserManager
.
getInstance
().
redpkg
))
.
setFontSize
(
40
,
true
)
.
append
(
" ≈ ${UserManager.getInstance().redpkg}个"
)
.
setFontSize
(
14
,
true
)
.
create
()
}
override
fun
getHallListSuc
(
data
:
TaskInfoBean
)
{
tasksAdapter
?.
taskData
=
data
.
list
recy_tasks
.
adapter
?.
notifyDataSetChanged
()
if
(
rb_my_cash
.
isChecked
)
{
tv_my_money
.
text
=
SpanUtils
()
.
append
(
FormatUtil
.
getCashFormaet
(
UserManager
.
getInstance
().
redpkg
))
...
...
@@ -165,6 +152,11 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
}
}
override
fun
getHallListSuc
(
data
:
TaskInfoBean
)
{
tasksAdapter
?.
taskData
=
data
.
list
recy_tasks
.
adapter
?.
notifyDataSetChanged
()
}
private
fun
initListener
()
{
btn_my_draw
.
setOnClickListener
(
this
)
btn_task
.
setOnClickListener
(
this
)
...
...
video/app/src/main/res/drawable/shape_withdraw.xml
0 → 100644
View file @
b13b8fba
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<!-- 填充的颜色 -->
<solid
android:color=
"@color/color_FDE7CF"
/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners
android:radius=
"20dp"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/drawable/shape_withdraw_half.xml
View file @
b13b8fba
...
...
@@ -5,6 +5,8 @@
<solid
android:color=
"@color/color_FDE7CF"
/>
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners
android:radius=
"20dip"
/>
<corners
android:topLeftRadius=
"30dp"
android:topRightRadius=
"30dp"
/>
</shape>
\ No newline at end of file
video/app/src/main/res/layout/dialog_drawcash.xml
View file @
b13b8fba
...
...
@@ -4,13 +4,15 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_tab_friends"
android:orientation=
"vertical"
android:padding=
"@dimen/dp_10"
>
android:orientation=
"vertical"
>
<com.google.android.material.tabs.TabLayout
android:id=
"@+id/tab_draw"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginStart=
"10dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"10dp"
app:tabBackground=
"@null"
app:tabIndicatorColor=
"@color/color_F61F03"
app:tabIndicatorHeight=
"0dp"
...
...
video/app/src/main/res/layout/drama_activity_api_detail.xml
View file @
b13b8fba
...
...
@@ -56,7 +56,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom|end"
android:layout_marginEnd=
"@dimen/dp_10"
android:layout_marginBottom=
"2
0
0dp"
/>
android:layout_marginBottom=
"2
6
0dp"
/>
<ImageView
android:id=
"@+id/iv_pause"
...
...
video/app/src/main/res/layout/fragment_draw.xml
View file @
b13b8fba
...
...
@@ -2,7 +2,8 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
android:padding=
"@dimen/dp_10"
>
<RelativeLayout
android:layout_width=
"match_parent"
...
...
@@ -10,7 +11,7 @@
android:layout_marginStart=
"12dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"12dp"
android:background=
"@drawable/shape_withdraw
_half
"
android:background=
"@drawable/shape_withdraw"
android:padding=
"6dp"
>
<TextView
...
...
@@ -93,7 +94,7 @@
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginEnd=
"15dp"
android:background=
"@drawable/shape_withdraw_h
alf
"
android:background=
"@drawable/shape_withdraw_h
eader
"
android:text=
"去提现"
android:textColor=
"@color/white"
android:textSize=
"@dimen/font_size_16"
/>
...
...
video/app/src/main/res/layout/layout_draw_header.xml
View file @
b13b8fba
...
...
@@ -34,19 +34,19 @@
android:layout_marginStart=
"30dp"
android:gravity=
"center"
android:maxWidth=
"66dp"
android:minWidth=
"5
0
dp"
android:minWidth=
"5
5
dp"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
<Button
android:id=
"@+id/btn_draw_cash"
android:layout_width=
"
50
dp"
android:layout_width=
"
46
dp"
android:layout_height=
"26dp"
android:layout_marginEnd=
"6dp"
android:background=
"@drawable/shape_withdraw_header"
android:text=
"@string/draw_cash"
android:textColor=
"@color/white"
android:textSize=
"1
5
sp"
/>
android:textSize=
"1
4
sp"
/>
</LinearLayout>
...
...
@@ -80,20 +80,20 @@
android:layout_marginStart=
"30dp"
android:gravity=
"center"
android:maxWidth=
"66dp"
android:minWidth=
"5
0
dp"
android:minWidth=
"5
5
dp"
android:text=
"-"
android:textColor=
"@color/white"
android:textSize=
"14sp"
/>
<Button
android:id=
"@+id/btn_draw_gold"
android:layout_width=
"
50
dp"
android:layout_width=
"
46
dp"
android:layout_height=
"26dp"
android:layout_marginEnd=
"6dp"
android:background=
"@drawable/shape_withdraw_header"
android:text=
"@string/draw_cash"
android:textColor=
"@color/white"
android:textSize=
"1
5
sp"
/>
android:textSize=
"1
4
sp"
/>
</LinearLayout>
...
...
video/app/src/main/res/layout/media_layout_quiz.xml
View file @
b13b8fba
...
...
@@ -21,7 +21,7 @@
android:layout_centerHorizontal=
"true"
android:layout_marginStart=
"48dp"
android:layout_marginEnd=
"48dp"
android:layout_marginBottom=
"
7
0dp"
android:layout_marginBottom=
"
4
0dp"
android:background=
"@drawable/shape_mild_trans"
android:gravity=
"center"
android:padding=
"@dimen/dp_10"
...
...
@@ -46,6 +46,7 @@
android:layout_centerInParent=
"true"
android:paddingBottom=
"5dp"
android:textColor=
"@color/color_3F2F8F"
android:textSize=
"16sp"
android:textStyle=
"bold"
tools:text=
"心太软"
/>
...
...
@@ -89,6 +90,7 @@
android:layout_centerInParent=
"true"
android:paddingBottom=
"5dp"
android:textColor=
"@color/color_3F2F8F"
android:textSize=
"16sp"
android:textStyle=
"bold"
tools:text=
"伤心太平洋"
/>
...
...
@@ -145,7 +147,7 @@
android:layout_marginEnd=
"30dp"
android:background=
"@drawable/bg_jlfb"
android:orientation=
"vertical"
android:visibility=
"
visibl
e"
>
android:visibility=
"
gon
e"
>
<TextView
android:layout_width=
"wrap_content"
...
...
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