Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Admob banner steals focus

I'm having some trouble with my Admob banners. Whenever I add two banners in one activity, sometimes the second banner (which is usually at the bottom of the screen) 'steals' focus. This way the user has to scroll all the way up to start reading the text. I tried all the possibilities with focusable etc., but none of them seem to work. I followed the instructions on the android developer pages (which are very clear and easy to follow) so I doubt if it's useful to post any code here. The code works so I don't get any errors that I can post here...

By the way: it is allowed to add two banners in one activity as long as they're not visible at the same time...

Any help would be appreciated...

Thanks!

like image 247
user3599700 Avatar asked Dec 02 '25 23:12

user3599700


1 Answers

Just add this tag in your root layout.. One line enough for fix this

android:descendantFocusability="blocksDescendants"
like image 86
Ranjithkumar Avatar answered Dec 04 '25 12:12

Ranjithkumar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!