2015-09-12 2 views
0

Я пытаюсь установить нижнюю панель на мягкой клавиатуре. как это возможно, я сделал следующий код, но все мои взгляды повышаются, когда EditText сфокусирован.Как исправить нижнюю панель на мягкой клавиатуре

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    tools:context="com.example.yasser.version6.Comment"> 


    <include 
     android:id="@+id/toolbar" 
     layout="@layout/toolbar" /> 

    <RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 


     <RelativeLayout 
      android:id="@+id/textsend" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" 
      android:layout_alignParentLeft="true" 
      > 





      <EditText 
       android:id="@+id/commenttext" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_alignParentLeft="true" 
       android:layout_toLeftOf="@+id/textSendButton" 
       android:background="@drawable/shape" 
       android:ems="10" 
       android:imeOptions="flagNoExtractUi|actionSend" 
       android:inputType="textShortMessage|textMultiLine|textCapSentences" 
       android:minHeight="48dp" 
       android:minLines="1" 
       android:paddingBottom="12dp" 
       android:paddingLeft="8dp" 
       android:paddingRight="8dp" 
       android:paddingTop="12dp" 
       android:textSize="14sp" > 
      </EditText> 

      <ImageButton 
       android:id="@+id/textSendButton" 
       android:layout_width="48dp" 
       android:layout_height="48dp" 
       android:layout_alignParentRight="true" 
       android:layout_centerVertical="true" 
       android:background="#3D107B" 
       android:src="@drawable/ic_action_send" /> 
     </RelativeLayout> 


    </RelativeLayout> 






</LinearLayout> 

и ниже, как это выглядит, как при попытке напечатать что-нибудь на EditText

enter image description here

ответ

1

Удалить линейную компоновку и держать все в относительном макете вместо этого. Сделайте alignParentTop = true для панели инструментов