机器人如何调整在全屏模式下布局时softkeyboard可见 [英] Android How to adjust layout in Full Screen Mode when softkeyboard is visible
问题描述
我已经研究调整布局时softkeyboard活跃了很多,我已经成功地实现它,但是当我使用的问题就来了安卓主题=@安卓风格/ Theme.NoTitleBar.Fullscreen
这在清单文件我的活动标签。
I have researched a lot to adjust the layout when softkeyboard is active and I have successfully implemented it but the problem comes when I use android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
this in my activity tag in manifest file.
为此,我使用了机器人:windowSoftInputMode =adjustPan | adjustResize | stateHidden
有不同的选择,但没有运气
For this I have used android:windowSoftInputMode="adjustPan|adjustResize|stateHidden"
with different options but no luck.
在我实施全屏
编程和尝试了各种布局与全屏
但一切都是徒劳的工作。
After that I implemented FullScreen
programmatically and tried various layout to work with FullScreen
but all in vain.
我提到这些链接,并期待很多帖子在这里与此相关的问题:
I referred these links and have looked many posts here related to this issue:
<一个href="http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html">http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html
<一个href="http://davidwparker.com/2011/08/30/android-how-to-float-a-row-above-keyboard/">http://davidwparker.com/2011/08/30/android-how-to-float-a-row-above-keyboard/
下面是XML code:
Here is xml code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/masterContainerView"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#ffffff">
<ScrollView android:id="@+id/parentScrollView"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
<TextView android:id="@+id/setup_txt" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Setup - Step 1 of 3"
android:textColor="@color/top_header_txt_color" android:textSize="20dp"
android:padding="8dp" android:gravity="center_horizontal" />
<TextView android:id="@+id/txt_header" android:layout_width="fill_parent"
android:layout_height="40dp" android:text="AutoReply:"
android:textColor="@color/top_header_txt_color" android:textSize="14dp"
android:textStyle="bold" android:padding="10dp"
android:layout_below="@+id/setup_txt" />
<EditText android:id="@+id/edit_message"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:text="Some text here." android:textSize="16dp"
android:textColor="@color/setting_editmsg_color" android:padding="10dp"
android:minLines="5" android:maxLines="6" android:layout_below="@+id/txt_header"
android:gravity="top" android:scrollbars="vertical"
android:maxLength="132" />
<ImageView android:id="@+id/image_bottom"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_below="@+id/edit_message" />
</LinearLayout>
</ScrollView>
<RelativeLayout android:id="@+id/scoringContainerView"
android:layout_width="fill_parent" android:layout_height="50px"
android:orientation="vertical" android:layout_alignParentBottom="true"
android:background="#535254">
<Button android:id="@+id/btn_save" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_alignParentRight="true"
android:layout_marginTop="7dp" android:layout_marginRight="15dp"
android:layout_below="@+id/edit_message"
android:text = "Save" />
<Button android:id="@+id/btn_cancel" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_marginTop="7dp"
android:layout_marginRight="10dp" android:layout_below="@+id/edit_message"
android:layout_toLeftOf="@+id/btn_save" android:text = "Cancel" />
</RelativeLayout>
</RelativeLayout>
我要下2个按钮应该向上走的时候softkeyboard进来的画面。
I want the bottom 2 buttons should go upward when the softkeyboard comes in picture.
推荐答案
<一个href="http://$c$c.google.com/p/android/issues/list?can=2&q=fullscreen&colspec=ID+Type+Status+Owner+Summary+Stars&cells=tiles">http://$c$c.google.com/p/android/issues/list?can=2&q=fullscreen&colspec=ID+Type+Status+Owner+Summary+Stars&cells=tiles
- > <一个href="http://$c$c.google.com/p/android/issues/detail?id=5497&q=fullscreen&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars">http://$c$c.google.com/p/android/issues/detail?id=5497&q=fullscreen&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
- > <一个href="https://groups.google.com/group/android-developers/msg/5690ac3a9819a53b?pli=1">https://groups.google.com/group/android-developers/msg/5690ac3a9819a53b?pli=1
- >全屏模式不调整
-> fullscreen mode doesn't resize
这篇关于机器人如何调整在全屏模式下布局时softkeyboard可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!