android - Adding admob widget hiding the button -


i trying have admob ad on bottom of activity inside tablerow. problem when adding admob widget is not displaying button below it. when ad not loaded shows button shows ad button disappears. below code :

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"     android:id="@+id/outerlinearlayout"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:background="@drawable/background"     android:orientation="vertical" >      <scrollview         android:id="@+id/scrollview"         android:layout_width="fill_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:background="@android:color/white"         android:fillviewport="true" >          <linearlayout             android:id="@+id/linearlayout"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:orientation="vertical" >              <tablelayout                 android:layout_width="fill_parent"                 android:layout_height="wrap_content" >                  <tablerow                     android:layout_width="wrap_content"                     android:layout_height="wrap_content" >                      <textview                         android:id="@+id/storycontentheader"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:padding="2dip"                         android:linespacingextra="10dip"                         android:text="curteous coutney walsh gifts world cup final pakistan"                         android:textcolor="@android:color/black"                         android:textsize="25dip"                         android:textstyle="bold"                         android:fontfamily="calibri"                          />                 </tablerow>                  <tablerow                     android:layout_width="wrap_content"                     android:layout_height="wrap_content" >                      <textview                         android:id="@+id/storycontentauthor"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:padding="2dip"                         android:text="martin arthur | 5 people voted story\n"                         android:textcolor="@android:color/black"                         android:textsize="12dip"                         android:textstyle="bold" />                 </tablerow>                  <tablerow                     android:layout_width="wrap_content"                     android:layout_height="wrap_content" >                      <textview                         android:id="@+id/storytags"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:padding="2dip"                         android:text="martin arthur | 5 people voted story\n"                         android:textcolor="@android:color/black"                         android:textsize="12dip"                         android:textstyle="bold" />                 </tablerow>                  <tablerow                     android:layout_width="wrap_content"                     android:layout_height="wrap_content" >                      <imageview                         android:id="@+id/storyimage"                         android:layout_width="fill_parent"                         android:layout_height="wrap_content"                         android:src="@drawable/icon" />                 </tablerow>                  <tablerow                     android:layout_width="wrap_content"                     android:layout_height="wrap_content" >                      <textview                         android:id="@+id/storycontent"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:linespacingextra="10dip"                         android:padding="10dip"                         android:text="content"                         android:textcolor="@android:color/black"                         android:fontfamily="calibri"                         android:textsize="16dip" />                 </tablerow>             </tablelayout>         </linearlayout>     </scrollview>      <tablelayout         android:id="@+id/footer_layout"         android:layout_width="wrap_content"         android:layout_height="wrap_content" >   <tablerow             android:id="@+id/footer_tablerow1"             android:layout_width="wrap_content"             android:layout_height="wrap_content" >              <com.google.ads.adview                 android:id="@+id/adview"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 ads:adsize="banner"                 ads:adunitid="xxxxxxxxxx"                 ads:loadadoncreate="true" />         </tablerow>         <tablerow             android:id="@+id/footer_tablerow2"             android:layout_width="wrap_content"             android:layout_height="wrap_content" >      <textview                         android:id="@+id/lastupdated"                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:padding="2dip"                         android:text="martin arthur | 5 people voted story\n"                         android:textcolor="@android:color/white"                         android:textsize="12dip"                         android:layout_gravity="center"                         android:textstyle="bold" />             <button                 android:id="@+id/back_btn"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_gravity="right"                 android:text="back"                 android:textcolor="@android:color/background_light" />         </tablerow>     </tablelayout>  </linearlayout> 

the button disappears back_btn. can please me on this.

regards, amandeep

try this..

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"     android:id="@+id/outerlinearlayout"     android:layout_width="match_parent"     android:layout_height="match_parent".     android:background="@drawable/background"     android:orientation="vertical" >      <scrollview         android:id="@+id/scrollview"         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:background="@android:color/white"         android:fillviewport="true" >          <linearlayout             android:id="@+id/linearlayout"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:orientation="vertical" >              <textview                 android:id="@+id/storycontentheader"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:fontfamily="calibri"                 android:linespacingextra="10dip"                 android:padding="2dip"                 android:text="curteous coutney walsh gifts world cup final pakistan"                 android:textcolor="@android:color/black"                 android:textsize="25dip"                 android:textstyle="bold" />              <textview                 android:id="@+id/storycontentauthor"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:padding="2dip"                 android:text="martin arthur | 5 people voted story\n"                 android:textcolor="@android:color/black"                 android:textsize="12dip"                 android:textstyle="bold" />              <textview                 android:id="@+id/storytags"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:padding="2dip"                 android:text="martin arthur | 5 people voted story\n"                 android:textcolor="@android:color/black"                 android:textsize="12dip"                 android:textstyle="bold" />              <imageview                 android:id="@+id/storyimage"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:src="@drawable/icon" />              <textview                 android:id="@+id/storycontent"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:fontfamily="calibri"                 android:linespacingextra="10dip"                 android:padding="10dip"                 android:text="content"                 android:textcolor="@android:color/black"                 android:textsize="16dip" />         </linearlayout>     </scrollview>      <com.google.ads.adview         android:id="@+id/adview"         android:layout_width="match_parent"         android:layout_height="wrap_content"         ads:adsize="banner"         ads:adunitid="xxxxxxxxxx"         ads:loadadoncreate="true" />      <linearlayout         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:orientation="horizontal" >          <textview             android:id="@+id/lastupdated"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_gravity="center"             android:padding="2dip"             android:text="martin arthur | 5 people voted story\n"             android:textcolor="@android:color/white"             android:textsize="12dip"             android:textstyle="bold" />          <button             android:id="@+id/back_btn"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_gravity="right"             android:text="back"             android:textcolor="@android:color/background_light" />     </linearlayout>  </linearlayout> 

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -