Commit 4b0477b1 authored by wanglei's avatar wanglei

...

parent 8abecc48
...@@ -2,6 +2,7 @@ package com.base.browserwhite.ui.activity.news ...@@ -2,6 +2,7 @@ package com.base.browserwhite.ui.activity.news
import android.content.Intent import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.view.View
import androidx.activity.addCallback import androidx.activity.addCallback
import androidx.core.view.updatePadding import androidx.core.view.updatePadding
import com.base.browserwhite.ads.AdmobMaxHelper import com.base.browserwhite.ads.AdmobMaxHelper
...@@ -115,6 +116,9 @@ class NewsActivity : BaseActivity<ActivityNewsBinding>() { ...@@ -115,6 +116,9 @@ class NewsActivity : BaseActivity<ActivityNewsBinding>() {
isLoading = false isLoading = false
binding.root.post { binding.root.post {
LogEx.logDebug(TAG, "beanCallBack") LogEx.logDebug(TAG, "beanCallBack")
if (it.isNotEmpty()) {
binding.ivPlaceHolder.visibility = View.GONE
}
if (lastNewsId == null || changeCategory) { if (lastNewsId == null || changeCategory) {
newsAdapter.submitList(it) newsAdapter.submitList(it)
} else { } else {
......
...@@ -51,6 +51,11 @@ ...@@ -51,6 +51,11 @@
app:tab_indicator_style="STYLE_NONE" app:tab_indicator_style="STYLE_NONE"
app:tab_select_color="@color/white" /> app:tab_select_color="@color/white" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv" android:id="@+id/rv"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -59,4 +64,15 @@ ...@@ -59,4 +64,15 @@
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_news" /> tools:listitem="@layout/item_news" />
<ImageView
android:layout_marginHorizontal="16dp"
android:background="@mipmap/zhanweitu_news"
android:id="@+id/iv_place_holder"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ContentDescription" />
</FrameLayout>
</LinearLayout> </LinearLayout>
\ No newline at end of file
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