2013-01-16 120 views
1

我有两个LinearLayout中firts一个有四个编辑文本和第二个有一个按钮:安卓:键盘隐藏按钮

<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> 

这是前述结果: enter image description here

但是,当键盘显示按钮是hidde:

enter image description here

我怎么能强迫当键盘显示按钮打开?

回答

0

你应该在滚动视图设置你的线性布局...因此,如果元素是滚动视图中,当键盘在使用时,该按钮将移动到键盘

+0

对不起府顶层它不工作。此代码仍然不工作:\t \t \t \t \t \t \t <的TableRow机器人:取向= “水平”> \t \t \t \t \t \t \t \t \t \t \t \t <机器人的TableRow:取向= “水平”> \t \t \t \t \t <的LinearLayout> \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t Rafael