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
f8f769c8
Commit
f8f769c8
authored
Nov 29, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
319242ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
14 deletions
+15
-14
AlipayTimeActivity.kt
...com/duben/loveplayletu/ui/activitys/AlipayTimeActivity.kt
+1
-2
SimpleCountDownTimer.java
...m/duben/loveplayletu/ui/widgets/SimpleCountDownTimer.java
+8
-6
activity_alipaytime.xml
video/app/src/main/res/layout/activity_alipaytime.xml
+3
-3
fragment_main.xml
video/app/src/main/res/layout/fragment_main.xml
+3
-3
No files found.
video/app/src/main/java/com/duben/loveplayletu/ui/activitys/AlipayTimeActivity.kt
View file @
f8f769c8
...
...
@@ -9,7 +9,6 @@ import com.airbnb.lottie.LottieCompositionFactory
import
com.airbnb.lottie.LottieDrawable
import
com.duben.library.utils.nodoubleclick.AntiShake
import
com.duben.loveplayletu.R
import
com.duben.loveplayletu.mvp.model.OrderRecordBean
import
com.duben.loveplayletu.ui.activitys.base.BaseActivity
import
com.duben.loveplayletu.ui.widgets.SimpleCountDownTimer
import
kotlinx.android.synthetic.main.activity_alipaytime.*
...
...
@@ -46,7 +45,7 @@ class AlipayTimeActivity : BaseActivity(), View.OnClickListener {
ivBack
.
setOnClickListener
(
this
)
countDownTimer
=
SimpleCountDownTimer
(
((
alipaytime
)
*
60
*
1000
).
toLong
(),
((
alipaytime
)).
toLong
(),
tv_alipaytime
).
setOnFinishListener
{
finish
()
...
...
video/app/src/main/java/com/duben/loveplayletu/ui/widgets/SimpleCountDownTimer.java
View file @
f8f769c8
...
...
@@ -45,11 +45,12 @@ public class SimpleCountDownTimer extends CountDownTimer {
}
/**
* @param millisInFuture 倒计时总时间 单位:毫秒
* The number of millis in the future from the call
* to {@link #start()} until the countdown is done and {@link #onFinish()}
* is called.
* @param tvDisplay 显示时间的视图
* @param millisInFuture 倒计时总时间 单位:毫秒
* The number of millis in the future from the call
* to {@link #start()} until the countdown is done and {@link #onFinish()}
* is called.
*
* @param tvDisplay 显示时间的视图
*/
public
SimpleCountDownTimer
(
long
millisInFuture
,
TextView
tvDisplay
)
{
super
(
millisInFuture
,
DEFAULT_INTERVAL
);
...
...
@@ -68,12 +69,13 @@ public class SimpleCountDownTimer extends CountDownTimer {
long
lMin
=
(
millisUntilFinished
-
lHr
*
hr
)
/
min
;
long
lSec
=
(
millisUntilFinished
-
lHr
*
hr
-
lMin
*
min
)
/
sec
;
long
lMs
=
millisUntilFinished
-
lHr
*
hr
-
lMin
*
min
-
lSec
*
sec
;
String
strLHr
=
getTime
(
lHr
);
String
strLMin
=
getTime
(
lMin
);
String
strLSec
=
getTime
(
lSec
);
String
strLMs
=
getMs
(
lMs
);
// 依次拼接时间 时:分:秒:毫秒
// tvDisplay.setText(strLHr + ":" + strLMin + ":" + strLSec + ":" + strLMs);
tvDisplay
.
setText
(
strLMin
+
":"
+
strLSec
+
":"
+
strLMs
);
tvDisplay
.
setText
(
strLMin
+
":"
+
strLSec
+
":"
+
strLMs
);
}
...
...
video/app/src/main/res/layout/activity_alipaytime.xml
View file @
f8f769c8
...
...
@@ -35,8 +35,8 @@
<TextView
android:id=
"@+id/tv_alipaytime"
android:layout_width=
"1
3
0dp"
android:layout_height=
"4
2
dp"
android:layout_width=
"1
4
0dp"
android:layout_height=
"4
6
dp"
android:layout_gravity=
"center"
android:background=
"@drawable/shape_bg_write"
android:gravity=
"center"
...
...
@@ -51,6 +51,6 @@
android:gravity=
"center_horizontal"
android:layout_marginTop=
"20dp"
android:textSize=
"15sp"
android:textColor=
"@color/
order_color
"
android:textColor=
"@color/
white
"
android:text=
"请耐心等待~\n注意:若取消开通,默认不参与返现活动"
></TextView>
</LinearLayout>
video/app/src/main/res/layout/fragment_main.xml
View file @
f8f769c8
...
...
@@ -245,10 +245,10 @@
<com.airbnb.lottie.LottieAnimationView
android:id=
"@+id/iv_kefu_main"
android:layout_width=
"
8
0dp"
android:layout_height=
"
8
0dp"
android:layout_width=
"
10
0dp"
android:layout_height=
"
10
0dp"
android:layout_marginEnd=
"5dp"
android:layout_marginBottom=
"1
0
0dp"
android:layout_marginBottom=
"1
2
0dp"
android:visibility=
"gone"
app:lottie_fileName=
"main_alipay.json"
app:lottie_autoPlay=
"true"
...
...
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