Commit 7fd6a633 authored by wanglei's avatar wanglei

同步代码

parent 3e31f346
Pipeline #1181 canceled with stages
...@@ -72,6 +72,8 @@ class FileCategoryActivity : BaseActivity<ActivityFileCategoryBinding>() { ...@@ -72,6 +72,8 @@ class FileCategoryActivity : BaseActivity<ActivityFileCategoryBinding>() {
} }
} }
}.show() }.show()
AdmobUtils.showNativeAd(this, binding.flAd)
} }
private fun initStatusBar() { private fun initStatusBar() {
......
...@@ -54,6 +54,8 @@ class FileManagerActivity : BaseActivity<ActivityFileManagerBinding>() { ...@@ -54,6 +54,8 @@ class FileManagerActivity : BaseActivity<ActivityFileManagerBinding>() {
AdPreparationPop(this) { AdPreparationPop(this) {
AdmobUtils.showInterstitialAd(this) {} AdmobUtils.showInterstitialAd(this) {}
}.show() }.show()
AdmobUtils.showNativeAd(null, binding.flAd)
} }
private fun initStatusBar() { private fun initStatusBar() {
......
...@@ -43,6 +43,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() { ...@@ -43,6 +43,7 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
binding.rv.adapter = screenShotAdapter binding.rv.adapter = screenShotAdapter
playLottie() playLottie()
AdmobUtils.showNativeAd(this, binding.flAd)
} }
private fun playLottie() { private fun playLottie() {
...@@ -59,12 +60,13 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() { ...@@ -59,12 +60,13 @@ class ScreenShotActivity : BaseActivity<ActivityScreenShotBinding>() {
if (checkStorePermission()) { if (checkStorePermission()) {
initData() initData()
} else { } else {
dialog = showGerPermission(null, deny = {}, dialog = showGerPermission(null, deny = {
allow = { onBackPressedDispatcher.onBackPressed()
requestStorePermission(launcher, result = { flag -> }, allow = {
if (flag) initData() else finishToMain() requestStorePermission(launcher, result = { flag ->
}) if (flag) initData() else finishToMain()
}) })
})
} }
} }
......
...@@ -93,9 +93,9 @@ class ScreenShotAdapter( ...@@ -93,9 +93,9 @@ class ScreenShotAdapter(
fun setData(screenshotBean: List<ScreenshotBean>) { fun setData(screenshotBean: List<ScreenshotBean>) {
beans.clear() beans.clear()
beans.addAll(screenshotBean) beans.addAll(screenshotBean)
if (beans.isNotEmpty()) { // if (beans.isNotEmpty()) {
beans.add(1, ScreenshotBean().apply { isAd = true }) // beans.add(1, ScreenshotBean().apply { isAd = true })
} // }
notifyDataSetChanged() notifyDataSetChanged()
} }
......
...@@ -175,7 +175,9 @@ object NotificationHelper { ...@@ -175,7 +175,9 @@ object NotificationHelper {
} }
ID_BATTERY_PUSH -> { ID_BATTERY_PUSH -> {
remoteViews.setImageViewResource(R.id.iv_icon, R.mipmap.h_battery)
remoteViews.setTextViewText(R.id.tv_desc, "View phone battery consumption recently")
remoteViews.setTextViewText(R.id.tv_btn, "View")
} }
//==================================下面是被动推送的情况=============================================== //==================================下面是被动推送的情况===============================================
else -> { else -> {
......
...@@ -71,11 +71,11 @@ class NotificationCleanActivity : BaseActivity<ActivityLayoutTionCleanBinding>() ...@@ -71,11 +71,11 @@ class NotificationCleanActivity : BaseActivity<ActivityLayoutTionCleanBinding>()
startService(serviceIntent) startService(serviceIntent)
binding.idNeedNotifcationPremison.isVisible = false binding.idNeedNotifcationPremison.isVisible = false
playAnimal() playAnimal()
AdmobUtils.showNativeAd(this, binding.flAd)
} else { } else {
binding.idNeedNotifcationPremison.isVisible = true binding.idNeedNotifcationPremison.isVisible = true
AdmobUtils.showNativeAd(this, binding.flAdPermission)
} }
AdmobUtils.showNativeAd(this, binding.flAd)
} }
override fun initListener() { override fun initListener() {
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@mipmap/fanhui_w" android:src="@mipmap/fanhui_w"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
tools:ignore="ContentDescription" app:tint="@color/black"
app:tint="@color/black" /> tools:ignore="ContentDescription" />
</FrameLayout> </FrameLayout>
...@@ -78,6 +78,10 @@ ...@@ -78,6 +78,10 @@
android:layout_weight="1" android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.noober.background.view.BLTextView <com.noober.background.view.BLTextView
android:id="@+id/tv_delete" android:id="@+id/tv_delete"
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:src="@mipmap/fanhui_tint" android:src="@mipmap/fanhui_tint"
tools:ignore="ContentDescription" app:tint="@color/black"
app:tint="@color/black" /> tools:ignore="ContentDescription" />
</FrameLayout> </FrameLayout>
...@@ -134,6 +134,11 @@ ...@@ -134,6 +134,11 @@
</FrameLayout> </FrameLayout>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout <LinearLayout
android:id="@+id/ll_operation" android:id="@+id/ll_operation"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -89,7 +89,6 @@ ...@@ -89,7 +89,6 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" android:textStyle="bold"
app:bl_corners_radius="24dp" app:bl_corners_radius="24dp"
app:bl_solid_color="@color/theme_color" app:bl_solid_color="@color/theme_color"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
...@@ -205,5 +204,18 @@ ...@@ -205,5 +204,18 @@
app:bl_solid_color="@color/theme_color" app:bl_solid_color="@color/theme_color"
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp">
<FrameLayout
android:id="@+id/fl_ad_permission"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
</FrameLayout>
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toTopOf="@id/fl_ad"
app:layout_constraintTop_toBottomOf="@id/fl_top"> app:layout_constraintTop_toBottomOf="@id/fl_top">
<com.google.android.material.tabs.TabLayout <com.google.android.material.tabs.TabLayout
...@@ -64,10 +64,6 @@ ...@@ -64,10 +64,6 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" /> android:layout_weight="1" />
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>
<FrameLayout <FrameLayout
...@@ -127,7 +123,6 @@ ...@@ -127,7 +123,6 @@
android:background="@color/white" android:background="@color/white"
android:gravity="center" android:gravity="center"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView <com.airbnb.lottie.LottieAnimationView
...@@ -158,5 +153,10 @@ ...@@ -158,5 +153,10 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -64,8 +64,7 @@ ...@@ -64,8 +64,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.3"> app:layout_constraintVertical_bias="0.3"></FrameLayout>
</FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/ll_size" android:id="@+id/ll_size"
...@@ -123,6 +122,11 @@ ...@@ -123,6 +122,11 @@
android:layout_weight="1" android:layout_weight="1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<FrameLayout
android:id="@+id/fl_ad"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp"> android:layout_height="80dp">
...@@ -174,6 +178,7 @@ ...@@ -174,6 +178,7 @@
tools:ignore="HardcodedText" /> tools:ignore="HardcodedText" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout> </LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
......
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