Skip to content

Conversation

@MihaiCristianCondrea
Copy link
Owner

Summary

  • Replace native_ad with large_home_banner_native_ad across project
  • Add new small_home_banner_native_ad layout and wrap home banner ad in a card with rounded corners
  • Default NativeAdBannerView and loader now use large_home_banner_native_ad

Testing

  • ./gradlew test

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

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.

TextView attributionView = adView.findViewById(R.id.ad_attribution);
adView.setMediaView(mediaView);
adView.setHeadlineView(headlineView);
adView.setBodyView(bodyView);

[P1] Guard against missing native ad asset views

The new small_home_banner_native_ad.xml omits @id/ad_media and @id/ad_attribution, yet populateNativeAdView still calls adView.setMediaView(mediaView) (and later setAdvertiserView) without verifying that those views exist. When the home screen loads the small banner, both findViewById calls return null and setMediaView/setAdvertiserView throw NullPointerException, crashing ad loading. Either include those views in the small layout or skip the setter when the view lookup fails.


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".

The layout for the bottom app bar native ad was refactored to:
- Use a LinearLayout as the root container instead of MaterialCardView.
- Adjust padding and margins for better visual appearance.
- Set a minimum width and height for the ad call-to-action button.
- Change the ad container height in `activity_main.xml` to `wrap_content`.
@MihaiCristianCondrea MihaiCristianCondrea merged commit 7a5ccf8 into main Sep 10, 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