2014-01-16 36 views
0

我在我的android應用程序中集成了admob廣告。我使用jfeinstein的滑動菜單,所以當我滑動它時,adview也會滑動它。無論滑動菜單狀態如何讓它粘在屏幕上?滑動菜單時使adview棍子到位

一些代碼:

<com.google.ads.AdView 
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" 
    android:id="@+id/adview" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    ads:adSize="BANNER" 
    ads:adUnitId="ID" 
    ads:loadAdOnCreate="true" /> 

adView = (AdView) findViewById(R.id.adview); 
adView.loadAd(new AdRequest()); 

回答

0

嘗試將廣告對準你的佈局,而不是設置寬度,以填補父的左側和右側。 (它會像你想要的那樣填充頁面的底部,並停止滑動滑動菜單)。

我已經做了這個,所以我知道它的工作方式:)

+0

我不明白怎麼樣? – user2629828