Commit ef0d205d authored by jyx's avatar jyx

优化透明activity样式

parent ec3c08dd
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.ui.activitys.base.BaseActivity
import com.mints.flowbox.utils.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 : BaseActivity() {
class BoostFastActivity : Activity() {
companion object {
private const val RED = 0xffFF8080
private const val BLUE = 0xff8080FF
private const val CYAN = 0xff80ffff
private const val GREEN = 0xff80ff80
}
// 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) {
......
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.ui.activitys.base.BaseActivity
import com.mints.flowbox.utils.StatusBarUtil
/**
*
* 描述:透明activity,用于加载广告
*/
class TransparentActivity : BaseActivity() {
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
/**
* 加载广告
*/
......
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment