diff --git a/AGENTS.md b/AGENTS.md index 9aa4f282..3811394e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,6 +18,7 @@ You are an experienced Android app developer. - Run `./gradlew test` before committing changes. ## Native ads -- Native ad XML layouts should wrap their content in a `MaterialCardView` with the ID `ad_card` using `@style/Widget.Material3.CardView.Outlined` and appropriate rounded corner overlays. +- Native ad XML layouts should wrap their content in a `MaterialCardView` with the ID `ad_card` using a Material3 card style and appropriate rounded corner overlays. - Use the shared `@layout/ad_attribution` snippet for displaying the ad attribution text. -- Place the attribution include as the first child of the ad card and override its padding or text color attributes to fit each layout. +- Include the attribution exactly as `` with no additional attributes such as padding or margins. +- Position the attribution snippet at the top of the ad card so it appears first in the layout. diff --git a/app/src/main/res/layout/about_native_ad.xml b/app/src/main/res/layout/about_native_ad.xml new file mode 100644 index 00000000..c23d580e --- /dev/null +++ b/app/src/main/res/layout/about_native_ad.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 7d15a314..6f0e138a 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -56,7 +56,7 @@ diff --git a/app/src/main/res/layout/bottom_app_bar_native_ad.xml b/app/src/main/res/layout/bottom_app_bar_native_ad.xml index 3a1b4571..a91f9e9d 100644 --- a/app/src/main/res/layout/bottom_app_bar_native_ad.xml +++ b/app/src/main/res/layout/bottom_app_bar_native_ad.xml @@ -56,8 +56,8 @@ style="@style/Widget.Material3.Button.TextButton" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:minWidth="64dp" - android:minHeight="36dp" + android:minWidth="88dp" + android:minHeight="40dp" android:layout_marginStart="8dp" /> diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 97bc9c11..b2bcdda6 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -13,10 +13,11 @@ + app:nativeAdLayout="@layout/about_native_ad" />