Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_flowbox
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_flowbox
Commits
ef0d205d
Commit
ef0d205d
authored
Jul 23, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化透明activity样式
parent
ec3c08dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
44 deletions
+40
-44
BoostFastActivity.kt
...mints/flowbox/ui/activitys/keepalive/BoostFastActivity.kt
+19
-21
TransparentActivity.kt
...nts/flowbox/ui/activitys/keepalive/TransparentActivity.kt
+12
-13
activity_boost_fast.xml
app/src/main/res/layout/activity_boost_fast.xml
+9
-10
No files found.
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/BoostFastActivity.kt
View file @
ef0d205d
package
com.mints.flowbox.ui.activitys.keepalive
import
android.animation.Animator
import
android.animation.ArgbEvaluator
import
android.animation.ObjectAnimator
import
android.animation.ValueAnimator
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
...
...
@@ -12,7 +9,7 @@ import android.view.View
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.wifi.AppOutWifiAdManager
import
com.mints.flowbox.u
i.activitys.base.BaseActivity
import
com.mints.flowbox.u
tils.StatusBarUtil
import
kotlinx.android.synthetic.main.activity_boost_fast.*
import
kotlinx.android.synthetic.main.activity_boost_fast.fl_ad
import
kotlinx.android.synthetic.main.activity_boost_fast.iv_close
...
...
@@ -25,29 +22,30 @@ import kotlin.random.Random
* 描述:加速动画页
*/
@SuppressLint
(
"SetTextI18n"
)
class
BoostFastActivity
:
Base
Activity
()
{
class
BoostFastActivity
:
Activity
()
{
companion
object
{
private
const
val
RED
=
0
xffFF8080
private
const
val
BLUE
=
0
xff8080FF
private
const
val
CYAN
=
0
xff80ffff
private
const
val
GREEN
=
0
xff80ff80
}
//
companion object {
//
private const val RED = 0xffFF8080
//
private const val BLUE = 0xff8080FF
//
private const val CYAN = 0xff80ffff
//
private const val GREEN = 0xff80ff80
//
}
private
var
mType
=
0
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_boost_fast
)
StatusBarUtil
.
transparencyBar
(
this
)
// base extras
intent
.
extras
?.
let
{
mType
=
it
.
getInt
(
TransparentActivity
.
TIMING_TYPE
,
0
)
}
}
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_boost_fast
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
initViewsAndEvents
()
{
initView
()
startAnim
()
...
...
@@ -102,7 +100,7 @@ class BoostFastActivity : BaseActivity() {
private
fun
updateUi
()
{
ccav_speed
.
stopAnimation
()
ccav_speed
.
visibility
=
View
.
GONE
container
.
visibility
=
View
.
GONE
//
container.visibility = View.GONE
adContainer
.
visibility
=
View
.
VISIBLE
when
(
mType
)
{
...
...
app/src/main/java/com/mints/flowbox/ui/activitys/keepalive/TransparentActivity.kt
View file @
ef0d205d
package
com.mints.flowbox.ui.activitys.keepalive
import
android.app.Activity
import
android.os.Bundle
import
com.mints.flowbox.R
import
com.mints.flowbox.ad.express.ExpressManager
import
com.mints.flowbox.ad.wifi.AppOutWifiAdManager
import
com.mints.flowbox.u
i.activitys.base.BaseActivity
import
com.mints.flowbox.u
tils.StatusBarUtil
/**
*
* 描述:透明activity,用于加载广告
*/
class
TransparentActivity
:
Base
Activity
()
{
class
TransparentActivity
:
Activity
()
{
companion
object
{
const
val
TIMING_TYPE
=
"TIMING_TYPE"
...
...
@@ -25,24 +26,22 @@ class TransparentActivity : BaseActivity() {
private
var
mType
=
0
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
mType
=
it
.
getInt
(
TIMING_TYPE
,
0
)
}
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_trans
)
StatusBarUtil
.
transparencyBar
(
this
)
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_trans
override
fun
initViewsAndEvents
()
{
overridePendingTransition
(
0
,
0
)
// base extras
intent
.
extras
?.
let
{
mType
=
it
.
getInt
(
TIMING_TYPE
,
0
)
}
overridePendingTransition
(
0
,
0
)
loadAd
()
}
override
fun
isApplyKitKatTranslucency
()
=
true
/**
* 加载广告
*/
...
...
app/src/main/res/layout/activity_boost_fast.xml
View file @
ef0d205d
...
...
@@ -2,8 +2,7 @@
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/color_20000000"
>
android:layout_height=
"match_parent"
>
<androidx.appcompat.widget.LinearLayoutCompat
android:id=
"@+id/adContainer"
...
...
@@ -74,14 +73,14 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- <View-->
<!-- android:id="@+id/container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginStart="50dp"-->
<!-- android:layout_marginTop="200dp"-->
<!-- android:layout_marginEnd="50dp"-->
<!-- android:layout_marginBottom="200dp" />-->
<!-- <View-->
<!-- android:id="@+id/container"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- android:layout_marginStart="50dp"-->
<!-- android:layout_marginTop="200dp"-->
<!-- android:layout_marginEnd="50dp"-->
<!-- android:layout_marginBottom="200dp" />-->
<com.mints.flowbox.ui.widgets.CircleCleanAnimationView
android:id=
"@+id/ccav_speed"
...
...
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