Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
B
Browser White
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanglei
Browser White
Commits
ddccacbb
Commit
ddccacbb
authored
Sep 06, 2024
by
wanglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
...
parent
f78e32f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
WeatherUtils.kt
app/src/main/java/com/base/browserwhite/help/WeatherUtils.kt
+1
-1
Splash2Activity.kt
...m/base/browserwhite/ui/activity/splash/Splash2Activity.kt
+21
-20
No files found.
app/src/main/java/com/base/browserwhite/help/WeatherUtils.kt
View file @
ddccacbb
...
@@ -174,7 +174,7 @@ object WeatherUtils {
...
@@ -174,7 +174,7 @@ object WeatherUtils {
/**
/**
* 同步
* 同步
*/
*/
fun
getWeatherData
()
{
fun
getWeatherData
()
=
runCatching
{
val
client
=
OkHttpClient
.
Builder
().
apply
{
val
client
=
OkHttpClient
.
Builder
().
apply
{
if
(
BuildConfig
.
DEBUG
)
{
if
(
BuildConfig
.
DEBUG
)
{
addInterceptor
(
HttpLoggingInterceptor
().
apply
{
addInterceptor
(
HttpLoggingInterceptor
().
apply
{
...
...
app/src/main/java/com/base/browserwhite/ui/activity/splash/Splash2Activity.kt
View file @
ddccacbb
...
@@ -100,7 +100,6 @@ class Splash2Activity : BaseActivity<ActivitySplash2Binding>(),
...
@@ -100,7 +100,6 @@ class Splash2Activity : BaseActivity<ActivitySplash2Binding>(),
val
weatherCityBean
=
WeatherUtils
.
getWeatherEntity
()
val
weatherCityBean
=
WeatherUtils
.
getWeatherEntity
()
val
weather
=
weatherCityBean
?.
list
?.
random
()
val
weather
=
weatherCityBean
?.
list
?.
random
()
if
(
weather
!=
null
)
{
if
(
weather
!=
null
)
{
launch
(
Dispatchers
.
Main
)
{
launch
(
Dispatchers
.
Main
)
{
LogEx
.
logDebug
(
TAG
,
"weather 开始 ${weather.fxDate}"
)
LogEx
.
logDebug
(
TAG
,
"weather 开始 ${weather.fxDate}"
)
...
@@ -147,25 +146,27 @@ class Splash2Activity : BaseActivity<ActivitySplash2Binding>(),
...
@@ -147,25 +146,27 @@ class Splash2Activity : BaseActivity<ActivitySplash2Binding>(),
}
}
}
}
}
else
{
}
else
{
if
(
isAgree
)
{
launch
(
Dispatchers
.
Main
)
{
AnimationUtils
.
startAlphaAnimation
(
binding
.
pb
,
400
,
null
)
{
if
(
isAgree
)
{
callback
.
invoke
()
AnimationUtils
.
startAlphaAnimation
(
binding
.
pb
,
400
,
null
)
{
}
callback
.
invoke
()
}
else
{
}
AnimationUtils
.
startAlphaAnimation
(
binding
.
idTvStart
,
400
,
{
}
else
{
val
set1
=
AnimatorSet
()
AnimationUtils
.
startAlphaAnimation
(
binding
.
idTvStart
,
400
,
{
// 创建缩放动画的ObjectAnimator
val
set1
=
AnimatorSet
()
val
scaleUpAnimator1
=
ObjectAnimator
.
ofFloat
(
binding
.
idTvStart
,
"scaleX"
,
1f
,
0.95f
,
1.05f
)
// 创建缩放动画的ObjectAnimator
val
scaleUpAnimator2
=
ObjectAnimator
.
ofFloat
(
binding
.
idTvStart
,
"scaleY"
,
1f
,
0.95f
,
1.05f
)
val
scaleUpAnimator1
=
ObjectAnimator
.
ofFloat
(
binding
.
idTvStart
,
"scaleX"
,
1f
,
0.95f
,
1.05f
)
scaleUpAnimator1
.
duration
=
400
// 动画持续500毫秒
val
scaleUpAnimator2
=
ObjectAnimator
.
ofFloat
(
binding
.
idTvStart
,
"scaleY"
,
1f
,
0.95f
,
1.05f
)
scaleUpAnimator1
.
repeatCount
=
1
// 重复次数
scaleUpAnimator1
.
duration
=
400
// 动画持续500毫秒
scaleUpAnimator1
.
repeatMode
=
ValueAnimator
.
REVERSE
// 反向重复,实现缩小效果
scaleUpAnimator1
.
repeatCount
=
1
// 重复次数
scaleUpAnimator2
.
duration
=
400
// 动画持续500毫秒
scaleUpAnimator1
.
repeatMode
=
ValueAnimator
.
REVERSE
// 反向重复,实现缩小效果
scaleUpAnimator2
.
repeatCount
=
1
// 重复次数
scaleUpAnimator2
.
duration
=
400
// 动画持续500毫秒
set1
.
playTogether
(
scaleUpAnimator1
,
scaleUpAnimator2
)
scaleUpAnimator2
.
repeatCount
=
1
// 重复次数
set1
.
start
()
set1
.
playTogether
(
scaleUpAnimator1
,
scaleUpAnimator2
)
})
{
set1
.
start
()
callback
.
invoke
()
})
{
callback
.
invoke
()
}
}
}
}
}
}
}
...
...
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