我正在做一个Android应用程序,我应该在底部放置两个按钮,当弹出键盘时,他们需要移动到键盘布局的上方,再次返回到底部页。怎么样?如何在页面布局中移动页脚
0
A
回答
0
查看AndroidManifest中activity
元素的android:windowSoftInputMode
属性。在我的应用程序中,我使用此代码:
<activity android:name="MyActivity"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize"
android:configChanges="orientation|keyboardHidden"
android:launchMode="singleInstance"
android:screenOrientation="portrait">
注意android:windowSoftInputMode="adjustResize"
行。在这里阅读更多:http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft
0
如果你总是想显示在屏幕上,那么你可能要考虑使用RelativeLayout。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.admob.android.ads.AdView
android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
app:backgroundColor="#000000"
app:primaryTextColor="#FFFFFF"
app:secondaryTextColor="#CCCCCC"
android:layout_alignParentTop="true"
/>
<!-- TextView below that -->
<TextView
android:id="@+id/widget28"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Input Amount:"
android:layout_marginLeft="10dip"
android:layout_marginTop="10dip"
android:layout_marginRight="10dip"
android:layout_below="@id/ad"
android:textSize="16dip"
android:textStyle="bold">
</TextView>
</RelativeLayout>
相关问题
- 1. 如何在布局中设置页面页脚
- 2. 如何调整jquery移动多页面布局中的移动分辨率?
- 3. 活动的页面布局
- 4. 页面布局
- 5. 如何隐藏特定页面上的页脚布局?
- 6. 在主布局或mvc 5页中渲染页面脚本?
- 7. 布局。尾页脚
- 8. 如何在HTML页面布局
- 9. aspx页面布局
- 10. 像页面布局
- 11. 中心和布局页面没有包装并且有页脚
- 12. 如何将页脚添加到布局?
- 13. 页面布局模式PHP页面
- 14. 如何将页脚和栏移动到页面底部
- 15. 在android布局中固定页脚
- 16. 如何使用自动布局刷新动态TableView页脚(不是页脚页脚)
- 17. wpf datagrid页脚布局
- 18. CSS页脚布局问题
- 19. Eclipse Android XML布局页眉和页脚
- 20. 如何使用MVC3 Razor布局页面?
- 21. 如何拥有静态页面布局
- 22. 如何编辑分类页面布局?
- 23. 移动页面
- 24. 在IE6中固定的页面布局
- 25. 在布局页面中使用ViewBag
- 26. 动态页面布局与Smarty模板
- 27. 页面布局滚动屏幕
- 28. Android页面活动或布局?
- 29. CSS布局 - 页脚重叠页面的内容
- 30. 如何在android中的线性布局中制作页脚