2013-11-15 3 views
8

나는 아래쪽에 거의 editText 필드가있는 활동이 있습니다. 그 editText 필드에 집중할 때 키보드가 나타나고 edittext 필드를 위로 밀면됩니다.editText와 softkeyboard 사이의 공간

중지되면 editText와 my softkeyboard 사이에 공백이 없습니다.

여백을 추가 할 수 있습니까? 커서 사이에 공간, http://postimg.org/image/826fwy18z/

과 이미지가 때 키보드가 표시됩니다 : 키보드가 나타납니다 전에 EDITTEXT 필드의

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:background="@color/bg_yellow" 
android:orientation="vertical" 
> 

<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="100dp" 
    android:layout_gravity="bottom" 
    android:layout_alignParentBottom="true" 
    android:paddingTop="25dp" 
    > 

    <RelativeLayout 
     android:layout_width="340dp" 
     android:layout_height="100dp" 
     android:layout_centerHorizontal="true" 
     > 

     <EditText 
      android:layout_width="340dp" 
      android:layout_height="45dp" 
      android:background="@drawable/edit_text_field" 
      android:inputType="text" 
      /> 

    </RelativeLayout> 
</RelativeLayout> 

위치 :

내 코드입니다 키보드 : http://postimg.org/image/97qlfb4zx/

+0

1 월, 스크린 샷을 업로드 할 수 있습니까? 나는 그 문제를 이해하지 못했다. –

+0

나는 시도했지만 충분한 평판 포인트가 없다 : (다른 방법이 있습니까? –

+0

이미 이미지를 업로드했습니다 :) –

답변

-1

편집 텍스트 필드의 아래쪽

android:layout_marginBottom="10dp" 
+0

나는 그 전에 시도했지만 공간에 어떤 영향도 미치지 않는다. –

1

매니페스트 파일에있는 활동의 android:windowSoftInputMode 속성을 사용할 수 있습니다.

사용 방법 android : windowSoftInputMode = "adjustResize" 귀하의 경우. 다른 속성도 확인할 수 있습니다.

희망이 도움이됩니다.

감사합니다.