简体   繁体   English

Android:键盘隐藏按钮

[英]Android: keyboard hidden button

I have two linearlayout firts one with four edit text and second one with a button: 我有两个linearlayout布局,一个带有四个编辑文本,另一个带有一个按钮:

    <LinearLayout android:layout_width="fill_parent"  xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_height="65dp"  android:orientation="horizontal" android:id="@+id/l_fields"
        android:stretchColumns="*"  android:layout_weight="1">
        <TableRow android:orientation="horizontal" >
            <AutoCompleteTextView style="@style/orderDropDownWidth" android:layout_weight="5" android:textColor="@color/black"
                    android:layout_height="wrap_content" android:completionThreshold="1"
                    android:id="@+id/eo_article" android:imeOptions="flagNoExtractUi"   >
            </AutoCompleteTextView>
            <EditText android:inputType="numberSigned" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/eo_sale" android:layout_weight="1"
            android:imeOptions="flagNoExtractUi"    android:focusable="true" android:focusableInTouchMode="true">   </EditText>
            <EditText android:inputType="numberSigned" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/eo_promo" android:layout_weight="1"
            android:imeOptions="flagNoExtractUi"></EditText>
            <EditText android:inputType="numberDecimal" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/eo_disc" android:layout_weight="1"
             android:imeOptions="flagNoExtractUi"></EditText>
        </TableRow>
    </LinearLayout>
<LinearLayout android:layout_width="fill_parent" android:id="@+id/linearLayoutadd" android:layout_height="55dp" 
    android:orientation="horizontal"  android:gravity="right" android:layout_weight="1" >
    <LinearLayout android:orientation="horizontal"  android:gravity="right" android:layout_weight="1" 
                  android:layout_width="wrap_content" android:layout_height="fill_parent">                        
        <Button android:text="@string/LINE_ADD" android:id="@+id/eo_baddline" android:layout_width="wrap_content" 
             android:gravity="top" style="@style/orderlineButtonSalePromo"           ></Button>
    </LinearLayout>

This is teh result: 这是结果: 在此处输入图片说明

But when keyboard is show the button is hidde: 但是当显示键盘时,按钮是隐藏的:

在此处输入图片说明

How can I force to display button when keyboard is open? 打开键盘后如何强制显示按钮?

您应该在滚动视图中设置线性布局...因此,如果元素在滚动视图中,则在使用键盘时,按钮将移至键盘的顶层

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM