2011-10-20 2 views
0

정적 텍스트 높이를 가진 EditText가 포함 된 활동을 가지므로, 긴 텍스트가 쓰여질 때 전체 텍스트를보기 위해 패닝하여 스크롤해야합니다. 그러나 가상 키보드가있을 때 사용자는 위쪽 및/또는 아래쪽 행으로 스크롤 할 수 없습니다.EditText의 스크롤 기능이 원하는대로 작동하지 않습니다.

검색했지만이 문제에 대한 해결책을 찾을 수 없습니다. 사용자가 전체 텍스트를 스크롤하고 볼 수 있도록하기 위해 XML을 사용자 정의 할 수있는 방법에 대한 제안 사항은 무엇입니까?

<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_height="fill_parent" 
    android:layout_width="fill_parent"> 
    <EditText 
     android:layout_width="fill_parent" 
     android:layout_height="0dip" 
     android:layout_weight="1"/> 
</LinearLayout> 

답변

0

희망이 도움이 될 것입니다.

<EditText 
     android:id="@+id/editText1" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:inputType="textMultiLine" 
     android:scrollbars="vertical" 
     <!-- This is for test purpose only --> android:maxLines="3"> 
    </EditText> 
+0

응용 프로그램의 디자인 제한으로 인해 높이는 정적 집합이어야하며 wrap_content가 아니어야합니다. maxLines를 낮은 수로 설정하면 나를 절약 할 수 있지만 모양 때문에 적절하지 않습니다. – Joe

0

동일한 문제가 발생했습니다.

android:isScrollContainer="true 속성을 추가하여 수정했습니다.

관련 문제