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
6144cdc1
Commit
6144cdc1
authored
Sep 19, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
98d483b2
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
335 additions
and
79 deletions
+335
-79
MusicPresenter.kt
...ava/com/duben/dayplaylet/mvp/presenters/MusicPresenter.kt
+4
-1
MusicView.kt
...src/main/java/com/duben/dayplaylet/mvp/views/MusicView.kt
+1
-0
LoanService.java
...p/src/main/java/com/duben/dayplaylet/net/LoanService.java
+1
-1
MainFragment.kt
...ain/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
+1
-1
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+174
-50
fragment_music.xml
video/app/src/main/res/layout/fragment_music.xml
+125
-0
media_layout_quiz.xml
video/app/src/main/res/layout/media_layout_quiz.xml
+29
-26
pic_dttx.png
video/app/src/main/res/mipmap-xhdpi/pic_dttx.png
+0
-0
vs_icon_anim_star.png
video/app/src/main/res/mipmap-xhdpi/vs_icon_anim_star.png
+0
-0
No files found.
video/app/src/main/java/com/duben/dayplaylet/mvp/presenters/MusicPresenter.kt
View file @
6144cdc1
...
@@ -22,6 +22,7 @@ class MusicPresenter : BasePresenter<MusicView>() {
...
@@ -22,6 +22,7 @@ class MusicPresenter : BasePresenter<MusicView>() {
override
fun
onError
(
e
:
Throwable
)
{
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
view
.
showToast
(
e
.
message
)
view
.
showToast
(
e
.
message
)
view
.
rdSongMsgFail
()
}
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MusicBean
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MusicBean
>)
{
...
@@ -35,6 +36,7 @@ class MusicPresenter : BasePresenter<MusicView>() {
...
@@ -35,6 +36,7 @@ class MusicPresenter : BasePresenter<MusicView>() {
view
.
rdSongMsgSuc
(
baseResponse
.
data
)
view
.
rdSongMsgSuc
(
baseResponse
.
data
)
}
}
else
->
{
else
->
{
view
.
rdSongMsgFail
()
view
.
showToast
(
message
)
view
.
showToast
(
message
)
}
}
}
}
...
@@ -43,8 +45,9 @@ class MusicPresenter : BasePresenter<MusicView>() {
...
@@ -43,8 +45,9 @@ class MusicPresenter : BasePresenter<MusicView>() {
}
}
// 添加金币
// 添加金币
fun
reportAddCoinMsg
(
carrierType
:
String
)
{
fun
reportAddCoinMsg
(
carrierType
:
String
,
ecpmId
:
String
=
""
)
{
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"ecpmId"
]
=
ecpmId
vo
[
"carrierType"
]
=
carrierType
vo
[
"carrierType"
]
=
carrierType
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
reportAddCoinMsg
(
vo
),
.
call
(
loanService
.
reportAddCoinMsg
(
vo
),
...
...
video/app/src/main/java/com/duben/dayplaylet/mvp/views/MusicView.kt
View file @
6144cdc1
...
@@ -4,5 +4,6 @@ import com.duben.dayplaylet.mvp.model.MusicBean
...
@@ -4,5 +4,6 @@ import com.duben.dayplaylet.mvp.model.MusicBean
interface
MusicView
:
BaseView
{
interface
MusicView
:
BaseView
{
fun
rdSongMsgSuc
(
data
:
MusicBean
)
fun
rdSongMsgSuc
(
data
:
MusicBean
)
fun
rdSongMsgFail
()
fun
reportAddCoinMsgSuc
()
fun
reportAddCoinMsgSuc
()
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/net/LoanService.java
View file @
6144cdc1
...
@@ -217,7 +217,7 @@ public interface LoanService {
...
@@ -217,7 +217,7 @@ public interface LoanService {
*
*
* @return
* @return
*/
*/
@POST
(
"api/reportAddCoinMsg"
)
@POST
(
"api/re
ward/re
portAddCoinMsg"
)
Observable
<
BaseResponse
<
JsonObject
>>
reportAddCoinMsg
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
JsonObject
>>
reportAddCoinMsg
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
View file @
6144cdc1
...
@@ -281,7 +281,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
...
@@ -281,7 +281,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
// 弹出新人红包
// 弹出新人红包
if
(!
isShowNewuserFlag
)
{
if
(!
isShowNewuserFlag
)
{
isShowNewuserFlag
=
true
isShowNewuserFlag
=
true
showNewcomerDialog
(
data
.
userMsg
.
rewardCoin
)
//
showNewcomerDialog(data.userMsg.rewardCoin)
}
}
}
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
6144cdc1
This diff is collapsed.
Click to expand it.
video/app/src/main/res/layout/fragment_music.xml
View file @
6144cdc1
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/rl"
android:id=
"@+id/rl"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
...
@@ -11,4 +12,128 @@
...
@@ -11,4 +12,128 @@
<include
layout=
"@layout/layout_draw_header"
/>
<include
layout=
"@layout/layout_draw_header"
/>
<RelativeLayout
android:id=
"@+id/rl_open_cash"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"160dp"
android:layout_marginEnd=
"20dp"
>
<ImageView
android:id=
"@+id/iv_open_cash"
android:layout_width=
"100dp"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:src=
"@mipmap/pic_dttx"
/>
<ProgressBar
android:id=
"@+id/pb_open_cash"
style=
"@android:style/Widget.ProgressBar.Horizontal"
android:layout_width=
"52dp"
android:layout_height=
"14dp"
android:layout_alignBottom=
"@id/iv_open_cash"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"22dp"
android:progressDrawable=
"@drawable/progressbar_versus_changevedio_bg"
/>
<TextView
android:id=
"@+id/tv_open_cash_progress"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/iv_open_cash"
android:layout_centerHorizontal=
"true"
android:layout_marginBottom=
"21dp"
android:text=
"3/5"
android:textColor=
"@color/red"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_open_cash_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/iv_open_cash"
android:layout_centerHorizontal=
"true"
android:background=
"@drawable/shape_bg_write"
android:paddingStart=
"6dp"
android:paddingTop=
"2dp"
android:paddingEnd=
"6dp"
android:paddingBottom=
"2dp"
android:text=
"@string/app_name"
android:textSize=
"12sp"
/>
</RelativeLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/cl_reward"
android:layout_width=
"match_parent"
android:layout_height=
"260dp"
android:layout_centerInParent=
"true"
android:layout_marginStart=
"40dp"
android:layout_marginEnd=
"40dp"
android:background=
"@drawable/shape_half_trans"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/tv_reward"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:drawablePadding=
"15dp"
android:text=
"恭喜获得"
android:textColor=
"@color/white"
android:textSize=
"22sp"
app:drawableEndCompat=
"@mipmap/vs_icon_anim_star"
app:drawableStartCompat=
"@mipmap/vs_icon_anim_star"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/iv_cash_reward"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_marginTop=
"40dp"
android:layout_marginEnd=
"20dp"
android:src=
"@mipmap/ic_redpkg"
app:layout_constraintEnd_toStartOf=
"@id/iv_gold_reward"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/tv_reward"
/>
<ImageView
android:id=
"@+id/iv_gold_reward"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_marginStart=
"20dp"
android:layout_marginTop=
"40dp"
android:src=
"@mipmap/ic_yuanbao"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/iv_cash_reward"
app:layout_constraintTop_toBottomOf=
"@id/tv_reward"
/>
<TextView
android:id=
"@+id/tv_cash_reward"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"+5"
android:textColor=
"@color/red"
android:textSize=
"30sp"
app:layout_constraintEnd_toEndOf=
"@id/iv_cash_reward"
app:layout_constraintStart_toStartOf=
"@id/iv_cash_reward"
app:layout_constraintTop_toBottomOf=
"@id/iv_cash_reward"
/>
<TextView
android:id=
"@+id/tv_gold_reward"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:text=
"+5"
android:textColor=
"@color/red"
android:textSize=
"30sp"
app:layout_constraintEnd_toEndOf=
"@id/iv_gold_reward"
app:layout_constraintStart_toStartOf=
"@id/iv_gold_reward"
app:layout_constraintTop_toBottomOf=
"@id/iv_gold_reward"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
</RelativeLayout>
\ No newline at end of file
video/app/src/main/res/layout/media_layout_quiz.xml
View file @
6144cdc1
...
@@ -10,39 +10,40 @@
...
@@ -10,39 +10,40 @@
android:id=
"@+id/quiz_iv"
android:id=
"@+id/quiz_iv"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
/>
android:layout_centerInParent=
"true"
android:layout_marginBottom=
"10dp"
/>
<TextView
<TextView
android:id=
"@+id/quiz_tv_qus"
android:id=
"@+id/quiz_tv_qus"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_above=
"@id/
f
l_option0"
android:layout_above=
"@id/
r
l_option0"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginStart=
"48dp"
android:layout_marginStart=
"48dp"
android:layout_marginEnd=
"48dp"
android:layout_marginEnd=
"48dp"
android:layout_marginBottom=
"
8
0dp"
android:layout_marginBottom=
"
7
0dp"
android:background=
"@drawable/shape_mild_trans"
android:background=
"@drawable/shape_mild_trans"
android:gravity=
"center"
android:gravity=
"center"
android:padding=
"@dimen/dp_10"
android:padding=
"@dimen/dp_10"
android:text=
"背景音乐是什么歌 _ _ _ _ ?"
android:text=
"背景音乐是什么歌 _ _ _ _ ?"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
<
Fram
eLayout
<
Relativ
eLayout
android:id=
"@+id/
f
l_option0"
android:id=
"@+id/
r
l_option0"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_above=
"@id/
f
l_option1"
android:layout_above=
"@id/
r
l_option1"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginStart=
"48dp"
android:layout_marginStart=
"48dp"
android:layout_marginEnd=
"48dp"
android:layout_marginEnd=
"48dp"
android:layout_marginBottom=
"20dp"
>
android:layout_marginBottom=
"20dp"
android:background=
"@drawable/icon_quiz_button_bg"
>
<TextView
<TextView
android:id=
"@+id/quiz_option0"
android:id=
"@+id/quiz_option0"
android:layout_width=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/icon_quiz_button_bg"
android:layout_centerInParent=
"true"
android:gravity=
"center"
android:paddingBottom=
"5dp"
android:paddingBottom=
"5dp"
android:textColor=
"@color/main_mints"
android:textColor=
"@color/main_mints"
android:textStyle=
"bold"
android:textStyle=
"bold"
...
@@ -52,8 +53,8 @@
...
@@ -52,8 +53,8 @@
android:id=
"@+id/quiz_iv_redbox0"
android:id=
"@+id/quiz_iv_redbox0"
android:layout_width=
"40dp"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
android:layout_
gravity=
"center_vertical
"
android:layout_
centerVertical=
"true
"
android:layout_
marginStart=
"50dp
"
android:layout_
toStartOf=
"@id/quiz_option0
"
android:paddingBottom=
"5dp"
android:paddingBottom=
"5dp"
android:src=
"@mipmap/ic_redpkg"
android:src=
"@mipmap/ic_redpkg"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
@@ -62,29 +63,30 @@
...
@@ -62,29 +63,30 @@
android:id=
"@+id/quiz_iv_option0"
android:id=
"@+id/quiz_iv_option0"
android:layout_width=
"26dp"
android:layout_width=
"26dp"
android:layout_height=
"26dp"
android:layout_height=
"26dp"
android:layout_gravity=
"end|center_vertical"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_marginEnd=
"20dp"
android:layout_marginEnd=
"20dp"
android:paddingBottom=
"5dp"
android:paddingBottom=
"5dp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</
Fram
eLayout>
</
Relativ
eLayout>
<
Fram
eLayout
<
Relativ
eLayout
android:id=
"@+id/
f
l_option1"
android:id=
"@+id/
r
l_option1"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginStart=
"48dp"
android:layout_marginStart=
"48dp"
android:layout_marginEnd=
"48dp"
android:layout_marginEnd=
"48dp"
android:layout_marginBottom=
"50dp"
>
android:layout_marginBottom=
"50dp"
android:background=
"@drawable/icon_quiz_button_bg"
>
<TextView
<TextView
android:id=
"@+id/quiz_option1"
android:id=
"@+id/quiz_option1"
android:layout_width=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/icon_quiz_button_bg"
android:layout_centerInParent=
"true"
android:gravity=
"center"
android:paddingBottom=
"5dp"
android:paddingBottom=
"5dp"
android:textColor=
"@color/main_mints"
android:textColor=
"@color/main_mints"
android:textStyle=
"bold"
android:textStyle=
"bold"
...
@@ -94,8 +96,8 @@
...
@@ -94,8 +96,8 @@
android:id=
"@+id/quiz_iv_redbox1"
android:id=
"@+id/quiz_iv_redbox1"
android:layout_width=
"40dp"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_height=
"40dp"
android:layout_
gravity=
"center_vertical
"
android:layout_
centerVertical=
"true
"
android:layout_
marginStart=
"50dp
"
android:layout_
toStartOf=
"@id/quiz_option1
"
android:paddingBottom=
"5dp"
android:paddingBottom=
"5dp"
android:src=
"@mipmap/ic_redpkg"
android:src=
"@mipmap/ic_redpkg"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
...
@@ -104,12 +106,13 @@
...
@@ -104,12 +106,13 @@
android:id=
"@+id/quiz_iv_option1"
android:id=
"@+id/quiz_iv_option1"
android:layout_width=
"26dp"
android:layout_width=
"26dp"
android:layout_height=
"26dp"
android:layout_height=
"26dp"
android:layout_gravity=
"end|center_vertical"
android:layout_alignParentEnd=
"true"
android:layout_centerVertical=
"true"
android:layout_marginEnd=
"20dp"
android:layout_marginEnd=
"20dp"
android:paddingBottom=
"5dp"
android:paddingBottom=
"5dp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</
Fram
eLayout>
</
Relativ
eLayout>
<TextView
<TextView
android:id=
"@+id/quiz_tv_pop"
android:id=
"@+id/quiz_tv_pop"
...
@@ -136,7 +139,7 @@
...
@@ -136,7 +139,7 @@
android:id=
"@+id/quiz_ll_pop"
android:id=
"@+id/quiz_ll_pop"
android:layout_width=
"128dp"
android:layout_width=
"128dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignTop=
"@id/
f
l_option0"
android:layout_alignTop=
"@id/
r
l_option0"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"-30dp"
android:layout_marginTop=
"-30dp"
android:layout_marginEnd=
"30dp"
android:layout_marginEnd=
"30dp"
...
@@ -171,7 +174,7 @@
...
@@ -171,7 +174,7 @@
android:id=
"@+id/finger_view"
android:id=
"@+id/finger_view"
android:layout_width=
"60dp"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_height=
"60dp"
android:layout_alignTop=
"@id/
f
l_option1"
android:layout_alignTop=
"@id/
r
l_option1"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"26dp"
android:layout_marginTop=
"26dp"
android:layout_marginEnd=
"48dp"
/>
android:layout_marginEnd=
"48dp"
/>
...
...
video/app/src/main/res/mipmap-xhdpi/pic_dttx.png
0 → 100755
View file @
6144cdc1
32.2 KB
video/app/src/main/res/mipmap-xhdpi/vs_icon_anim_star.png
0 → 100755
View file @
6144cdc1
295 Bytes
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