Also, even if I did do it dynamically, how do I know when to do it? I would need to trigger the gravity code to run after the ad has been loaded or when the gravity gets changed. Is there a way to trigger off one of these events?
On Apr 1, 9:54 am, adev <enric...@gmail.com> wrote: > The adview and admob is all in the XML. > I do not have any code related to it. > So that is not dynamic. > However, it seems that the height of the adview is not determined > until the ad is loaded. > When I start the app, the adview height seems to be zero, then after > one or two seconds, it appears and the rest of the layout resizes to > fit. > This is when the gravity is reset. > I couldn't figure out how to have a preset height. > > On Apr 1, 1:52 am, Narendra Singh Rathore <nsr.curi...@gmail.com> > wrote: > > > > > > > > > On Sun, Apr 1, 2012 at 8:01 AM, adev <enric...@gmail.com> wrote: > > > Sure I can reset the gravity on all of them in code, but that defeats > > > the purpose of using the XML. > > > No, not at all. Just reset the gravity of only the TextView in code. You > > need not to reset the gravity of all of them, as you are facing the problem > > only because of TextView's gravity. > > > > I'd like to know the cause of the issue I'm seeing now and solve it. > > > The cause of issue might be that, your adview is being loaded dynamically, > > hence you have to resolve the matter dynamically through code. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en