Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add small home banner ad layout and update native ad references #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

@MihaiCristianCondrea
Copy link
Owner

@MihaiCristianCondrea MihaiCristianCondrea commented Sep 10, 2025

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

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /