Skip to content

Conversation

@MihaiCristianCondrea
Copy link
Owner

Summary

  • replace ImageView with MediaView in bottom app bar ad layout
  • wrap bottom bar ad in MaterialCardView and use shared attribution snippet

Testing

  • ./gradlew test (fails: SDK location not found)

https://chatgpt.com/codex/tasks/task_e_68c5e5d9814c832d877f2ebdcc1bddce

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +29 to +43
<FrameLayout
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="12dp">

<com.google.android.gms.ads.nativead.MediaView
android:id="@+id/ad_media"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/ad_app_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Hide icon when media asset is available

The new layout stacks MediaView and ad_app_icon in the same FrameLayout. NativeAdLoader.populateNativeAdView makes the icon view visible whenever nativeAd.getIcon() is present, without checking whether nativeAd.getMediaContent() is also provided. For ads that deliver both assets (which is the common case), the icon remains visible and sits on top of the MediaView, so the media content never becomes visible despite being loaded. This regresses the intent of switching to MediaView for the bottom bar ad. Consider hiding the icon when media content is present or showing the icon only when media is absent.

Useful? React with 👍 / 👎.

@MihaiCristianCondrea MihaiCristianCondrea merged commit 269fb9e into main Sep 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants