Android Admob Not Showing Linearlayout On Bottom
Okay really weird situation with AdMob. I want to place the ad on the bottom I have a LinearLayout. When I do it never shows up. When I place it on top it shows up perfectly. N
Solution 1:
My guess is that your list view fills the screen and is pushing the adview down. Try this xml for the list view:
<ListViewandroid:id="@android:id/list"android:divider="#00000000"android:layout_width="fill_parent"android:layout_height="0px"android:layout_weight="1"android:drawSelectorOnTop="false"android:background="@android:color/transparent"android:cacheColorHint="#00000000"android:layout_alignParentTop="true"></ListView>
This will give the list view only as much real estate as is available after the image view and ad view claim their share.
Solution 2:
This might help too... Admob ads not showing - Android
As Ted says, the list view may be taking up all available real-estate. Even with wrap_content, if the list is populated with a lot of data before the adView populates, the adView will not be able to expand and place the ad.
Unless you do what I did and hard code it's height to about 50dp. Not very elegant, but still effective.
Post a Comment for "Android Admob Not Showing Linearlayout On Bottom"