2012-07-23 22 views
1

다양한 편집 텍스트와 회 전자가있는 페이지가 있습니다. 스크롤을 사용하려면 android:windowSoftInputMode="adjustResize"을 내 매니페스트에 입력해야합니다. 그러나 내보기를 스크롤 할 때 포커스가있는 편집 텍스트가 초점을 잃고 있습니다. 내 말은, 처음으로 텍스트를 편집하고, 아래로 스크롤하여 내 첫 번째 편집 텍스트로 돌아 왔지만 지금은 첫 번째 편집 텍스트가 포커스를 잃어 버렸다고 가정 해 봅시다. 흥미로운 지적은 API level4.0에서 같은 것을 테스트 할 때 pre가 아니라 4.0을 사용하는 것입니다.스크롤 할 때 텍스트 편집의 초점이 흐려짐

무엇을 도와 주는지 나 잃어버린 것을 제안하십시오.

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

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:orientation="vertical" > 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 



     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="@string/hello" /> 

      <EditText 
       android:id="@+id/et_user" 
       android:layout_width="250dp" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="20dp" 
       android:singleLine="true" /> 
     </LinearLayout> 
    </LinearLayout> 

</ScrollView> 

답변

0

을 wokring하는

그리고 코드에 대한

, 그 단지 몇 가지 편집 텍스트는이 안드로이드가 제공하는 무엇이며, 주변에 어떤 일이있을 수 있지만, 현재이 작동하는 방법입니다. 그래서 내가 당신에게 말할 수있는 것은이 제한이되는 것입니다. 모든 업데이트가 알려드립니다.

관련 문제