我在我的Android应用程序中集成了admob广告。我正在使用jfeinstein的滑动菜单,所以当我滑动它时,adview也会滑动它。无论滑动菜单状态如何,如何将其粘在屏幕上?如果没有这样的功能,我需要在库中编辑什么? 这就是我想要的(正如你所看到的,ad ad sticks):
布局:
<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" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/adview" >
...
</ScrollView>
// sliding menu
slidingMenu = new SlidingMenu(this);
slidingMenu.setMode(SlidingMenu.LEFT);
slidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
//slidingMenu.setShadowWidthRes(R.dimen.slidingmenu_shadow_width);
//slidingMenu.setShadowDrawable(R.drawable.slidingmenu_shadow);
slidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
slidingMenu.setFadeDegree(0.35f);
slidingMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
slidingMenu.setMenu(R.layout.slidingmenu);
fragment = new SlidingMenuFragment();
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.add(R.id.slidingmenu, fragment);
fragmentTransaction.commit();