2012-08-06 4 views
2

에 EDITTEXT를 다루고 난 다음 레이아웃이 있습니다안드로이드 소프트 키보드는 가로

enter image description here

는이 문제를 해결하는 방법이 있나요 :

<?xml version="1.0" encoding="utf-8"?> 

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent"> 

    <LinearLayout 
      android:layout_height="wrap_content" 
      android:layout_width="fill_parent" 
      android:orientation="vertical" 
      android:layout_above="@+id/edittext"> 

     <TextView 
       android:layout_height="wrap_content" 
       android:layout_width="fill_parent" 
       android:text="line1"/> 

     <TextView 
       android:layout_height="wrap_content" 
       android:layout_width="fill_parent" 
       android:text="line2"/> 

     <TextView 
       android:layout_height="wrap_content" 
       android:layout_width="fill_parent" 
       android:text="line3"/> 

    </LinearLayout> 

    <EditText 
      android:id="@id/edittext" 
      android:layout_height="wrap_content" 
      android:layout_width="fill_parent" 
      android:layout_margin="5dp" 
      android:text="test" 
      android:layout_alignParentBottom="true" 
      android:imeOptions="flagNoExtractUi" 
      /> 
</RelativeLayout> 

과 넥서스에 풍경

한 그 모습을 , 그러나 플래그 flagNoExtractUi 유지?

+0

주어진 링크에 대해 가능한 답변이 나와 있습니다. http://stackoverflow.com/questions/3295672/android-soft-keyboard-covers-edittext-field –

+0

내 [답변] (http : //)을 확인하십시오. stackoverflow.com/a/11822354/996493). – Lucifer

+0

android : windowSoftInputMode = "stateVisible | adjustResize"메디 페스트 파일의 활동 태그에서 http://developer.android.com/guide/topics/manifest/activity-element.html#wsoft – rajpara

답변

1

키보드가 나타나면보기가 완전히 보이도록 자동으로 스크롤되도록 ScrollView을 추가 할 수 있습니다.

<activity android:name=".TodoEdit" 
      android:windowSoftInputMode="adjustResize"> 
4

안드로이드 내부 <activity>이 좋아하는 매니페스트 정의! android:imeOptions="flagNoExtractUi"android:imeOptions="flagNoFullscreen"으로 바꾸면 모든 것이 작동합니다.

+0

나는 이것을했지만 작동하지 않습니다. 질문에서 내 마지막 코멘트를 참조하십시오 –

+0

안드로이드에서 처음 들었습니다 그 flag * flagNoExtractUi * 무엇입니까? –

+0

IME가 추출 된 텍스트 UI를 표시 할 필요가 없도록 지정하는 데 사용됩니다. 입력 모드가 전체 화면 일 수도 있고, 가로 모드 일 때 종종 작은 크기로 표시되어 응용 프로그램의 일부를 뒤에 표시 할 수 있습니다. 사용자가 사용할 수있는 응용 프로그램에 대한 제한된 액세스가있을지라도 (대부분) 전체 화면 IME의 경험을 덜 경쾌하게 만들 수 있습니다. 이 플래그가 지정되면 IME가 텍스트를 표시 할 수 있도록 설정되지 않을 수 있으므로이 매개 변수가 필요하지 않은 경우에만 사용해야합니다. –

0

안드로이드에서 버그가 수 있도록 보이지만 나는 해결책을 발견 :

관련 문제