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
8f8a2771
Commit
8f8a2771
authored
Sep 25, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
ebc92009
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
3 deletions
+86
-3
AndroidManifest.xml
video/app/src/main/AndroidManifest.xml
+1
-0
HintActivity.kt
...in/java/com/duben/dayplaylet/ui/activitys/HintActivity.kt
+7
-3
NineActivity.kt
...in/java/com/duben/dayplaylet/ui/activitys/NineActivity.kt
+66
-0
MainFragment.kt
...ain/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
+5
-0
MusicFragment.kt
...in/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
+7
-0
No files found.
video/app/src/main/AndroidManifest.xml
View file @
8f8a2771
...
...
@@ -158,6 +158,7 @@
<activity
android:name=
".ui.activitys.NineActivity"
android:exported=
"false"
android:launchMode=
"singleTask"
android:theme=
"@style/TransparentTheme"
/>
<activity
android:name=
".ui.activitys.SongAwardActivity"
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/activitys/HintActivity.kt
View file @
8f8a2771
...
...
@@ -19,7 +19,7 @@ import kotlinx.android.synthetic.main.activity_hint.*
/**
* 描述:提示
* 作者:孟崔广
* 时间:202
1/12
/13 14:05
* 时间:202
3/9
/13 14:05
*/
class
HintActivity
:
BaseActivity
(),
View
.
OnClickListener
{
...
...
@@ -158,14 +158,18 @@ class HintActivity : BaseActivity(), View.OnClickListener {
startActivity
(
intent
)
}
catch
(
e
:
java
.
lang
.
Exception
)
{
try
{
val
componentName
=
ComponentName
(
"com.android.settings"
,
"com.android.settings.DevelopmentSettings"
)
val
componentName
=
ComponentName
(
"com.android.settings"
,
"com.android.settings.DevelopmentSettings"
)
val
intent
=
Intent
()
intent
.
component
=
componentName
intent
.
action
=
"android.intent.action.View"
startActivity
(
intent
)
}
catch
(
e1
:
java
.
lang
.
Exception
)
{
try
{
val
intent
=
Intent
(
"com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS"
)
//部分小米手机采用这种方式跳转
val
intent
=
Intent
(
"com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS"
)
//部分小米手机采用这种方式跳转
startActivity
(
intent
)
}
catch
(
e2
:
java
.
lang
.
Exception
)
{
}
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/activitys/NineActivity.kt
View file @
8f8a2771
...
...
@@ -21,9 +21,12 @@ import com.duben.dayplaylet.manager.UserManager
import
com.duben.dayplaylet.ui.activitys.base.BaseActivity
import
com.duben.dayplaylet.ui.widgets.DialogListener
import
com.duben.dayplaylet.ui.widgets.WithDrawSucDialog
import
com.duben.dayplaylet.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.duben.dayplaylet.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.duben.dayplaylet.utils.rxutil.CommonRxTask
import
com.duben.dayplaylet.utils.rxutil.RxjavaUtil
import
com.duben.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_hint.*
import
kotlinx.android.synthetic.main.activity_nine.*
/**
...
...
@@ -40,6 +43,7 @@ class NineActivity : BaseActivity(), View.OnClickListener {
private
var
mWithDrawSucDialog
:
WithDrawSucDialog
?
=
null
var
drawId
=
""
var
cash
=
""
var
isClickFlag
=
false
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_nine
...
...
@@ -60,6 +64,7 @@ class NineActivity : BaseActivity(), View.OnClickListener {
override
fun
initViewsAndEvents
()
{
initListener
()
playFingerAnim
(
finger_view
)
startTimer
()
}
private
fun
initListener
()
{
...
...
@@ -72,6 +77,12 @@ class NineActivity : BaseActivity(), View.OnClickListener {
overridePendingTransition
(
0
,
R
.
anim
.
scale_out
)
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
stopTimer
()
}
override
fun
onClick
(
v
:
View
)
{
if
(
AntiShake
.
check
(
v
.
id
))
return
...
...
@@ -80,6 +91,8 @@ class NineActivity : BaseActivity(), View.OnClickListener {
finish
()
}
R
.
id
.
iv_nine_next
->
{
isClickFlag
=
true
if
(!
UserManager
.
getInstance
().
alipaySet
)
{
// 去授权
showToast
(
"发起支付宝授权.."
)
...
...
@@ -214,4 +227,57 @@ class NineActivity : BaseActivity(), View.OnClickListener {
}
view
.
setImageDrawable
(
lottieDrawable
)
}
private
var
mTimer
:
CountDownTimerSupport
?
=
null
fun
stopTimer
()
{
if
(
mTimer
!=
null
)
{
mTimer
!!
.
stop
()
mTimer
=
null
}
}
private
fun
startTimer
()
{
try
{
// 延迟跳转
stopTimer
()
mTimer
=
CountDownTimerSupport
(
3000L
,
1000L
)
mTimer
?.
setOnCountDownTimerListener
(
object
:
OnCountDownTimerListener
{
override
fun
onTick
(
millisUntilFinished
:
Long
)
{
if
(!
this
@NineActivity
.
isFinishing
)
{
}
}
override
fun
onFinish
()
{
if
(!
this
@NineActivity
.
isFinishing
)
{
if
(
isClickFlag
)
return
if
(!
UserManager
.
getInstance
().
alipaySet
)
{
// 去授权
showToast
(
"发起支付宝授权.."
)
AlipayAuthManager
.
authV2
(
this
@NineActivity
,
object
:
AlipayAuthManager
.
AuthListener
{
override
fun
authSuccess
()
{
showToast
(
"支付宝授权成功"
)
}
override
fun
authFail
(
resultStatus
:
String
)
{
showToast
(
"支付宝授权失败 "
+
resultStatus
)
}
})
return
}
HalfScreenManager
.
getInstance
().
preLoadAd
(
this
@NineActivity
)
showAd
(
Constant
.
CARRIERTYPE_SING_OVER
)
}
}
})
mTimer
?.
start
()
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
\ No newline at end of file
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MainFragment.kt
View file @
8f8a2771
...
...
@@ -82,6 +82,7 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
private
var
isSignDrawFlag
=
false
// 签到2次打款 用户主动取消流程结束
private
var
isShowSignFlag
=
false
private
var
isShowNewuserFlag
=
false
private
var
isNoSignFlag
=
false
// 新人红包
var
newcomerDialog
:
NewcomerDialog
?
=
null
...
...
@@ -315,6 +316,10 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
}
if
(
signMsg
==
null
)
{
iv_main_sign
.
visibility
=
View
.
GONE
if
(!
isNoSignFlag
)
{
isNoSignFlag
=
true
HalfScreenManager
.
getInstance
().
showAd
(
requireActivity
(),
null
)
}
}
else
{
iv_main_sign
.
visibility
=
View
.
VISIBLE
tv_main_signcash
.
text
=
"${signMsg!!.sumCash}元"
...
...
video/app/src/main/java/com/duben/dayplaylet/ui/fragment/MusicFragment.kt
View file @
8f8a2771
...
...
@@ -565,6 +565,13 @@ class MusicFragment : LazyLoadBaseFragment(), MusicView, View.OnClickListener {
pb_open_cash
.
progress
=
it
.
completeCount
if
(
it
.
completeCount
>=
it
.
turnNeedCount
)
{
tv_open_cash_info
.
visibility
=
View
.
GONE
Handler
(
Looper
.
getMainLooper
()).
postDelayed
({
val
bundle
=
Bundle
()
bundle
.
putString
(
NineActivity
.
DRAW_ID
,
it
.
unitId
)
bundle
.
putString
(
NineActivity
.
CASH
,
it
.
cash
)
readyGo
(
NineActivity
::
class
.
java
,
bundle
)
},
800
)
}
else
{
tv_open_cash_info
.
visibility
=
View
.
VISIBLE
tv_open_cash_info
.
text
=
SpanUtils
()
...
...
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