native_admob_flutter icon indicating copy to clipboard operation
native_admob_flutter copied to clipboard

Native AdTextView font

Open Jjagg opened this issue 3 years ago • 2 comments

Hi! Thank you for creating and maintaining this lib :) (I ran into some issues with google_mobile_ads and switched to this. This was way easier to set up and the ads just worked 🎉 The way to design the layout is a lot more fun to use too even if it's not using Flutter widgets! Anyway...)

It seems currently the font of a TextStyle is not passed on to the native TextView:

https://github.com/bdlukaa/native_admob_flutter/blob/536e1c89581c4a16bf9d2680ab4d2ab5ed5989eb/android/src/main/kotlin/com/bruno/native_admob_flutter/native/NativeAd.kt#L329-L341

It would be nice if I could customize the font to match the look of the rest of my app.

Jjagg avatar Jun 11 '21 12:06 Jjagg

Well, it's quite a different proccess to add a font to a android app. You gotta put the font file on the res folder, and then Android can recognize the font.

bdlukaa avatar Jun 11 '21 13:06 bdlukaa

Well, it's quite a different proccess to add a font to a android app. You gotta put the font file on the res folder, and then Android can recognize the font.

Hi @bdlukaa , Can you give us a very simple example how to implement font change in NativeAd.kt file? I forked your git and tried to modify that file to apply custom font, but it kept failing.

rocketman7 avatar Dec 22 '21 08:12 rocketman7