Returning to view that displays admob ad leads to incorrect shifted layout

217 views
Skip to first unread message

Peter - Umito

unread,
Apr 3, 2011, 9:00:50 AM4/3/11
to Google AdMob Ads Developers
I am having a strange problem.

My view consists of a viewflipper with two children. One of them is
my loading screen, the other is the main screen.
The main view is a simple linearlayout, with a linearlayout as
adcontainer (52dp) and the rest of the view as content.

When I don't add an admob ad to the adcontainer, everything works
fine. However, when I do add a ad, then I get strange layout problems
when returning to this view from a ad-click or other activity: It
looks like android doesn't always realizes that the taskbar is hidden
and doesn't shift the view back to full screen, leaving a black empty
taskbar visible, while shifting the rest of the view down. When I
press menu, the view gets shifted back to the original way it should
be.

When I don't add the ad, everything keeps being normal, so it looks
like it has something to do with the Admod adview.

Please see http:/www.umito.nl/admob_error.png for what happens. (A
screenshot right from my device).

Any ideas how to fix this? Since I can't release my app this way.

Other info: Screenorientation is landscape and theme is
theme.NoTitleBar.Fullscreen.

Kind regards,

Peter de Kraker - Umito



Peter - Umito

unread,
Apr 3, 2011, 9:10:59 AM4/3/11
to Google AdMob Ads Developers
Same problem in admob 4.0.4 unfortunately.

On 3 apr, 15:00, Peter - Umito <goo...@umito.nl> wrote:
> I am having a strange problem.
>
> My view consists of a viewflipper with two children.  One of them is
> my loading screen, the other is the main screen.
> The main view is a simple linearlayout, with a linearlayout as
> adcontainer (52dp) and the rest of the view as content.
>
> When I don't add an admob ad to the adcontainer, everything works
> fine. However, when I do add a ad, then I get strange layout problems
> when returning to this view from a ad-click or other activity: It
> looks like android doesn't always realizes that the taskbar is hidden
> and doesn't shift the view back to full screen, leaving a black empty
> taskbar visible, while shifting the rest of the view down. When I
> press menu, the view gets shifted back to the original way it should
> be.
>
> When I don't add the ad, everything keeps being normal, so it looks
> like it has something to do with the Admod adview.
>
> Please see http:/www.umito.nl/admob_error.pngfor what happens. (A

SH

unread,
Apr 3, 2011, 3:13:41 PM4/3/11
to Google AdMob Ads Developers
Have the same issue. Resorted to removing the AdView, recreating and
re-adding it once the ad that was clicked was dismissed.

On Apr 3, 9:10 am, Peter - Umito <goo...@umito.nl> wrote:
> Same problem in admob 4.0.4 unfortunately.
>
> On 3 apr, 15:00, Peter - Umito <goo...@umito.nl> wrote:
>
> > I am having a strange problem.
>
> > My view consists of a viewflipper with two children.  One of them is
> > my loading screen, the other is the main screen.
> > The main view is a simple linearlayout, with a linearlayout as
> > adcontainer (52dp) and the rest of the view as content.
>
> > When I don't add an admob ad to the adcontainer, everything works
> > fine. However, when I do add a ad, then I get strange layout problems
> > when returning to this view from a ad-click or other activity: It
> > looks like android doesn't always realizes that the taskbar is hidden
> > and doesn't shift the view back to full screen, leaving a black empty
> > taskbar visible, while shifting the rest of the view down. When I
> > press menu, the view gets shifted back to the original way it should
> > be.
>
> > When I don't add the ad, everything keeps being normal, so it looks
> > like it has something to do with the Admod adview.
>
> > Please see http:/www.umito.nl/admob_error.pngforwhat happens. (A

wes

unread,
Apr 5, 2011, 3:21:57 PM4/5/11
to google-adm...@googlegroups.com
We were unable to reproduce this with a simple ViewFlipper app on the Droid X, HTC Evo, Nexus S, or donut emulator.  What version of Android (and device) are you testing on?

Cheers,
Wes

Peter - Umito

unread,
Apr 8, 2011, 4:27:14 AM4/8/11
to Google AdMob Ads Developers
The error showed up on my HTC Desire Z, running Android 2.2
This weekend I will try to see if it also happens in the emulator.

On 5 apr, 21:21, wes <wesgood...@google.com> wrote:
> We were unable to reproduce this with a simple ViewFlipper app on the Droid
> X, HTC Evo, Nexus S, or donut emulator.  What version of Android (and
> device) are you testing on?
>
> Cheers,
> Wes
>
> On Sun, Apr 3, 2011 at 12:13 PM, SH <hockenberrysc...@gmail.com> wrote:
> > Have the same issue.  Resorted to removing the AdView, recreating and
> > re-adding it once the ad that was clicked was dismissed.
>
> > On Apr 3, 9:10 am, Peter - Umito <goo...@umito.nl> wrote:
> > > Same problem in admob 4.0.4 unfortunately.
>
> > > On 3 apr, 15:00, Peter - Umito <goo...@umito.nl> wrote:
>
> > > > I am having a strange problem.
>
> > > > My view consists of a viewflipper with two children.  One of them is
> > > > my loading screen, the other is the main screen.
> > > > The main view is a simple linearlayout, with a linearlayout as
> > > > adcontainer (52dp) and the rest of the view as content.
>
> > > > When I don't add an admob ad to the adcontainer, everything works
> > > > fine. However, when I do add a ad, then I get strange layout problems
> > > > when returning to this view from a ad-click or other activity: It
> > > > looks like android doesn't always realizes that the taskbar is hidden
> > > > and doesn't shift the view back to full screen, leaving a black empty
> > > > taskbar visible, while shifting the rest of the view down. When I
> > > > press menu, the view gets shifted back to the original way it should
> > > > be.
>
> > > > When I don't add the ad, everything keeps being normal, so it looks
> > > > like it has something to do with the Admod adview.
>
> > > > Please see http:/www.umito.nl/admob_error.pngforwhathappens. (A

Dhanan

unread,
Apr 9, 2011, 4:05:07 AM4/9/11
to Google AdMob Ads Developers
Me too facing the same problem

AdMob 4.0.4

HTC Desire HD (Android 2.2)
LG Optimus One (Android 2.2.1)

Any clue?

Best Regards,
Dhanan

Peter - Umito

unread,
Apr 30, 2011, 5:54:02 AM4/30/11
to Google AdMob Ads Developers
It looks like the issue is not due to admob, but due to Android
itself.

The bug occurs sometimes. It looks likely due to a race condition.

It occurs only when I go from my activity (that has theme fullscreen-
notitlebar and is in landscape) to another activity that has normal
theme and is not landscape. When switching back, sometimes the menubar
retracts but leaves a black empty space.

For a solution see: http://stackoverflow.com/questions/4328534/force-a-full-screen-activity-to-remeasure-redraw-on-resume
> > > > > > and doesn'tshiftthe view back to full screen, leaving a black empty

Tim

unread,
May 2, 2011, 5:42:04 PM5/2/11
to Google AdMob Ads Developers
Peter,

You are correct. This appears to be a bug in Android when a WebView is
at the top of the layout. We are looking into this issue.

Thanks
-Tim



On Apr 30, 2:54 am, Peter - Umito <goo...@umito.nl> wrote:
> It looks like the issue is not due to admob, but due to Android
> itself.
>
> The bug occurs sometimes. It looks likely due to a race condition.
>
> It occurs only when I go from my activity (that has theme fullscreen-
> notitlebar and is in landscape) to another activity that has normal
> theme and is not landscape. When switching back, sometimes the menubar
> retracts but leaves a black empty space.
>
> For a solution see:http://stackoverflow.com/questions/4328534/force-a-full-screen-activi...
> > > > > > > press menu, the view getsshiftedback to the original way it should
Reply all
Reply to author
Forward
0 new messages