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

Integrate native ad into Android Studio lessons #141

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 11, 2025

Summary

  • Add list-style native ad layout using MaterialCardView and attribution snippet
  • Implement NativeAdPreference that loads ads via NativeAdBannerView
  • Insert native ad preference into Android Studio lessons screen

Testing

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

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

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

android:targetPackage="com.d4rk.androidtutorials.java" />
</androidx.preference.Preference>
</androidx.preference.PreferenceCategory>
<com.d4rk.androidtutorials.java.ads.preferences.NativeAdPreference/>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot Sep 11, 2025

Choose a reason for hiding this comment

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

[P1] Add title or null-check for native ad preference

The newly inserted NativeAdPreference has no title attribute. AndroidStudioFragment.applyFilter assumes every Preference returns a non-null title and calls pref.getTitle().toString() when the search view is used, which now throws a NullPointerException because this ad preference lacks a title. Either give this preference a dummy title or make the filter logic null-safe so searching in the Android Studio lessons screen doesn’t crash.

Useful? React with 👍 / 👎.

@MihaiCristianCondrea MihaiCristianCondrea merged commit 81d299e into main Sep 11, 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 によって変換されたページ (->オリジナル) /