我刚刚将AdWhirl集成到我的应用程序中。我将AdWhirl视图设置为显示在我主要活动布局的底部。我的主布局上有几个EditText框,当应用第一次启动时,单击文本框通常会显示软键盘。但是,当我转到其他活动并返回到我的主要活动时,然后单击EditText软键盘弹出,顶部的AdWhirl视图弹出,覆盖了我的EditText框。我一直在为此挣扎好几天。任何帮助,将不胜感激。在软键盘上显示Adview
我有我的清单中定义的所有活动android:windowSoftInputMode =“adjustPan”。
这里是我的main.xml布局:
<RelativeLayout android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/ImageView02"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/other_bg_small" android:layout_weight="1"/>
<ImageView android:id="@+id/ImageView01"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:background="@drawable/banner" android:layout_alignParentTop="true"
android:paddingBottom="30dip"/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:stretchColumns="1" android:gravity="center" android:id="@+id/table01"
android:layout_below="@id/ImageView01" >
... Table stuff
</TableLayout>
<LinearLayout android:layout_width="fill_parent"
android:id="@+id/ad_layout" android:layout_height="wrap_content"
android:gravity="bottom" android:layout_alignParentBottom="true"
android:layout_alignBottom="@+id/RelativeLayout01" android:layout_weight="1">
<com.adwhirl.AdWhirlLayout android:id="@+id/adwhirl_layout"
android:layout_width="fill_parent" android:layout_height="wrap_content"/>
</LinearLayout>
</RelativeLayout>
这似乎帮助,唯一的问题是,我有2盒的EditText,如果我实现你的每一个解决方案,广告从来没有显示... – 2011-04-19 06:10:05
尝试以编程方式设置它使用getWindow()。setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);在你的onCreate。 – Joe 2011-04-19 07:00:06
我认为这工作!谢谢!我想知道为什么清单属性没有粘... – 2011-04-19 14:12:18