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
b6ae5bcd
Commit
b6ae5bcd
authored
Sep 22, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加九宫格代码
parent
a2295980
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
22 deletions
+68
-22
NineActivity.kt
...in/java/com/duben/dayplaylet/ui/activitys/NineActivity.kt
+26
-6
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+6
-6
RedpkgFragment.kt
...n/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
+1
-1
WithDrawSucDialog.kt
...java/com/duben/dayplaylet/ui/widgets/WithDrawSucDialog.kt
+6
-4
activity_nine.xml
video/app/src/main/res/layout/activity_nine.xml
+29
-5
ic_nine_btn.png
video/app/src/main/res/mipmap-xhdpi/ic_nine_btn.png
+0
-0
ic_nine_top.png
video/app/src/main/res/mipmap-xhdpi/ic_nine_top.png
+0
-0
No files found.
video/app/src/main/java/com/duben/dayplaylet/ui/activitys/NineActivity.kt
View file @
b6ae5bcd
...
...
@@ -6,12 +6,17 @@ import android.os.Handler
import
android.os.Looper
import
android.text.TextUtils
import
android.view.View
import
com.airbnb.lottie.LottieAnimationView
import
com.airbnb.lottie.LottieComposition
import
com.airbnb.lottie.LottieCompositionFactory
import
com.airbnb.lottie.LottieDrawable
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.duben.dayplaylet.R
import
com.duben.dayplaylet.ad.AdManager
import
com.duben.dayplaylet.ad.AdStatusListener
import
com.duben.dayplaylet.ad.NoPreAdManager
import
com.duben.dayplaylet.ad.half.HalfScreenManager
import
com.duben.dayplaylet.ad.half.HalfScreenManagerNoPre
import
com.duben.dayplaylet.common.AppConfig
import
com.duben.dayplaylet.common.Constant
...
...
@@ -61,7 +66,7 @@ class NineActivity : BaseActivity(), View.OnClickListener {
override
fun
initViewsAndEvents
()
{
initListener
()
playFingerAnim
(
finger_view
)
}
private
fun
initListener
()
{
...
...
@@ -82,13 +87,15 @@ class NineActivity : BaseActivity(), View.OnClickListener {
finish
()
}
R
.
id
.
iv_nine_next
->
{
// showAd(Constant.CARRIERTYPE_SING_OVER)
adCloseNext
(
""
)
HalfScreenManager
.
getInstance
().
preLoadAd
(
this
)
showAd
(
Constant
.
CARRIERTYPE_SING_OVER
)
// adCloseNext("")
}
}
}
private
fun
showAd
(
carrierType
:
String
)
{
AdManager
.
instance
.
showAd
(
this
@NineActivity
,
carrierType
,
object
:
AdStatusListener
{
var
canFail
=
false
...
...
@@ -163,17 +170,17 @@ class NineActivity : BaseActivity(), View.OnClickListener {
private
fun
showWithdrawSucDialog
()
{
TrackManager
.
getInstance
().
addCashoutReq
(
drawId
)
mWithDrawSucDialog
=
WithDrawSucDialog
(
context
,
10
,
object
:
DialogListener
()
{
WithDrawSucDialog
(
context
,
cash
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
when
(
v
?.
id
)
{
R
.
id
.
btn
->
{
HalfScreenManager
NoPre
.
getInstance
().
showAd
(
this
@NineActivity
,
null
)
HalfScreenManager
.
getInstance
().
showAd
(
this
@NineActivity
,
null
)
finish
()
}
R
.
id
.
ib_close
->
{
HalfScreenManager
NoPre
.
getInstance
().
showAd
(
this
@NineActivity
,
null
)
HalfScreenManager
.
getInstance
().
showAd
(
this
@NineActivity
,
null
)
finish
()
}
else
->
{}
...
...
@@ -183,4 +190,17 @@ class NineActivity : BaseActivity(), View.OnClickListener {
})
mWithDrawSucDialog
?.
show
()
}
private
fun
playFingerAnim
(
view
:
LottieAnimationView
)
{
view
.
visibility
=
View
.
VISIBLE
val
lottieDrawable
=
LottieDrawable
()
LottieCompositionFactory
.
fromAsset
(
context
,
"home_shouzhi.json"
)
.
addListener
{
result
:
LottieComposition
?
->
lottieDrawable
.
setImagesAssetsFolder
(
"home_shouzhi/"
)
lottieDrawable
.
composition
=
result
lottieDrawable
.
loop
(
true
)
lottieDrawable
.
playAnimation
()
}
view
.
setImageDrawable
(
lottieDrawable
)
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
b6ae5bcd
...
...
@@ -89,12 +89,12 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
rl_open_cash
.
setOnClickListener
{
mMusicBean
?.
let
{
// if(it.completeCount>=it.turnNeedCount)
{
val
bundle
=
Bundle
()
bundle
.
putString
(
NineActivity
.
DRAW_ID
,
it
.
unitId
)
bundle
.
putString
(
NineActivity
.
CASH
,
it
.
cash
)
readyGo
(
NineActivity
::
class
.
java
,
bundle
)
//
}
if
(
it
.
completeCount
>=
it
.
turnNeedCount
)
{
val
bundle
=
Bundle
()
bundle
.
putString
(
NineActivity
.
DRAW_ID
,
it
.
unitId
)
bundle
.
putString
(
NineActivity
.
CASH
,
it
.
cash
)
readyGo
(
NineActivity
::
class
.
java
,
bundle
)
}
}
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/RedpkgFragment.kt
View file @
b6ae5bcd
...
...
@@ -296,7 +296,7 @@ class RedpkgFragment : LazyLoadBaseFragment(), View.OnClickListener, RedpkgView
HalfScreenManager
.
getInstance
().
preLoadAd
(
requireActivity
())
mWithDrawSucDialog
=
WithDrawSucDialog
(
requireContext
(),
10
,
object
:
DialogListener
()
{
WithDrawSucDialog
(
requireContext
(),
"0.02"
,
object
:
DialogListener
()
{
override
fun
onClick
(
dialog
:
Dialog
?,
v
:
View
?)
{
super
.
onClick
(
dialog
,
v
)
dialog
?.
dismiss
()
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/widgets/WithDrawSucDialog.kt
View file @
b6ae5bcd
...
...
@@ -19,7 +19,7 @@ import com.duben.dayplaylet.utils.UIUtils
*/
class
WithDrawSucDialog
(
context
:
Context
,
cash
:
Int
,
cash
Str
:
String
,
listener
:
DialogListener
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
...
...
@@ -58,9 +58,11 @@ class WithDrawSucDialog(
tvCash3
=
findViewById
(
R
.
id
.
tv_cash_3
)
flAd
=
findViewById
(
R
.
id
.
fl_ad
)
tvCash1
.
text
=
""
tvCash1
.
text
=
""
tvCash1
.
text
=
""
if
(
cashStr
.
length
>=
4
)
{
tvCash1
.
text
=
cashStr
.
subSequence
(
0
,
1
)
tvCash2
.
text
=
cashStr
.
subSequence
(
2
,
3
)
tvCash3
.
text
=
cashStr
.
subSequence
(
3
,
4
)
}
ibClose
.
setOnClickListener
(
listener
)
btn
.
setOnClickListener
(
listener
)
...
...
video/app/src/main/res/layout/activity_nine.xml
View file @
b6ae5bcd
...
...
@@ -20,27 +20,51 @@
android:layout_gravity=
"right"
android:src=
"@mipmap/ic_draw_quit"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"-20dp"
android:src=
"@mipmap/ic_nine_top"
></ImageView>
<RelativeLayout
android:id=
"@+id/rl_lucky"
android:layout_width=
"315dp"
android:layout_height=
"315dp"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"
14
dp"
>
android:layout_marginTop=
"
-20
dp"
>
<com.duben.dayplaylet.ui.widgets.luckymonkeypanel.LuckyMonkeyPanelView2
android:id=
"@+id/lucky_panel2"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/iv_nine_next"
<FrameLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"20dp"
android:src=
"@mipmap/bg_draw_btn"
></ImageView>
android:layout_marginTop=
"20dp"
>
<ImageView
android:id=
"@+id/iv_nine_next"
android:layout_width=
"240dp"
android:layout_height=
"70dp"
android:scaleType=
"fitXY"
android:src=
"@mipmap/ic_nine_btn"
></ImageView>
<com.airbnb.lottie.LottieAnimationView
android:id=
"@+id/finger_view"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_alignTop=
"@id/rl_option1"
android:layout_gravity=
"right"
android:layout_marginTop=
"26dp"
android:layout_marginEnd=
"18dp"
/>
</FrameLayout>
</LinearLayout>
</RelativeLayout>
video/app/src/main/res/mipmap-xhdpi/ic_nine_btn.png
0 → 100644
View file @
b6ae5bcd
93.3 KB
video/app/src/main/res/mipmap-xhdpi/ic_nine_top.png
0 → 100644
View file @
b6ae5bcd
130 KB
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