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
95943cd1
Commit
95943cd1
authored
Oct 07, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新人红包去除倒计时,添加关闭
parent
951df63f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
35 deletions
+95
-35
MainFragment.kt
...in/java/com/duben/miniplaylet/ui/fragment/MainFragment.kt
+72
-26
NewcomerDialog.kt
...n/java/com/duben/miniplaylet/ui/widgets/NewcomerDialog.kt
+9
-8
dialog_newcomer.xml
video/app/src/main/res/layout/dialog_newcomer.xml
+1
-0
fragment_main.xml
video/app/src/main/res/layout/fragment_main.xml
+13
-1
ic_main_comer.png
video/app/src/main/res/mipmap-xhdpi/ic_main_comer.png
+0
-0
No files found.
video/app/src/main/java/com/duben/miniplaylet/ui/fragment/MainFragment.kt
View file @
95943cd1
This diff is collapsed.
Click to expand it.
video/app/src/main/java/com/duben/miniplaylet/ui/widgets/NewcomerDialog.kt
View file @
95943cd1
...
...
@@ -18,7 +18,7 @@ import kotlinx.android.synthetic.main.dialog_newcomer.*
import
kotlinx.android.synthetic.main.dialog_sign.*
import
java.math.BigDecimal
class
NewcomerDialog
(
private
val
context
:
Context
,
private
val
rewardCoin
:
Int
)
:
class
NewcomerDialog
(
private
val
context
:
Context
,
private
val
rewardCoin
:
Int
,
listener
:
DialogListener
)
:
Dialog
(
context
,
R
.
style
.
dialog
)
{
...
...
@@ -59,6 +59,7 @@ class NewcomerDialog(private val context: Context, private val rewardCoin: Int)
isClickBtn
=
true
adListener
?.
showAd
()
}
tv_newcomer_time
.
setOnClickListener
(
listener
)
val
sumCoin
=
rewardCoin
.
toString
()
val
allcoinBig
=
BigDecimal
(
sumCoin
)
...
...
@@ -71,18 +72,18 @@ class NewcomerDialog(private val context: Context, private val rewardCoin: Int)
.
append
(
"元"
)
.
create
()
Handler
().
postDelayed
({
startTimer
()
},
900
)
//
Handler().postDelayed({
//
startTimer()
//
}, 900)
}
override
fun
dismiss
()
{
super
.
dismiss
()
if
(
timer
!=
null
)
{
//防止计时器重复
timer
!!
.
stop
()
timer
=
null
}
//
if (timer != null) { //防止计时器重复
//
timer!!.stop()
//
timer = null
//
}
}
fun
startTimer
()
{
...
...
video/app/src/main/res/layout/dialog_newcomer.xml
View file @
95943cd1
...
...
@@ -37,6 +37,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"10dp"
android:background=
"@mipmap/ic_draw_quit"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"14sp"
></TextView>
...
...
video/app/src/main/res/layout/fragment_main.xml
View file @
95943cd1
...
...
@@ -175,7 +175,7 @@
android:id=
"@+id/iv_main_sign"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
40
0dp"
android:layout_marginTop=
"
33
0dp"
android:layout_marginRight=
"20dp"
android:visibility=
"gone"
app:layout_constraintRight_toRightOf=
"parent"
...
...
@@ -201,6 +201,18 @@
android:textSize=
"13sp"
/>
</FrameLayout>
<ImageView
android:id=
"@+id/iv_main_newcomer"
android:layout_width=
"65dp"
android:layout_height=
"65dp"
android:layout_marginLeft=
"10dp"
android:visibility=
"gone"
android:layout_marginTop=
"430dp"
android:layout_marginRight=
"20dp"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
android:src=
"@mipmap/ic_main_comer"
/>
<ImageView
android:id=
"@+id/iv_main_tempanim"
...
...
video/app/src/main/res/mipmap-xhdpi/ic_main_comer.png
0 → 100644
View file @
95943cd1
18.7 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