2

データ入力タイプのアクティビティがあり、テキストビューと編集テキストのセットを均等に配置するために線形レイアウトを使用しています。次に、ソフトキーボードが起動している間にユーザーがスクロールできるようにするスクロールビューがあります。android:fillViewportlinearlayoutを使用すると、適切に機能し、画面がいっぱいになり、各項目が均等に広がりますが、キーボードが表示され、各項目が均等に広がるのを停止します。私が使用するandroid:windowSoftInputMode="stateVisible|adjustPan"と、linearlayoutは広がったままになりますが、スクロールビューはもう機能しません(これに関するすべての未解決の投稿から、adjustPanでスクロールビューを機能させることはできないと思います)

リニアレイアウトを変更せずにソフトキーボードが起動している間、アイテムが均等に広がり、まだ機能する、スクロールビュー内にリニアレイアウトを設定する方法はありますか?

     <?xml version="1.0" encoding="utf-8"?>
          <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
          android:fillViewport
           >


         <LinearLayout 
           android:gravity="left" 
           android:orientation="vertical" 
           android:id="@id/tab2" 
           android:paddingLeft="40.0dip"
           android:paddingTop="0.0dip" 
           android:paddingRight="40.0dip" 
           android:layout_width="fill_parent" 
           android:layout_height="wrap_content"
          >



        <LinearLayout 
              android:orientation="vertical"  
              android:layout_width="fill_parent" 
              android:layout_height="wrap_content" 
              android:layout_weight="1.0">
         <TextView 
              android:id="@id/textViewBrand" 
              android:layout_width="wrap_content" 
              android:layout_height="wrap_content" 
              android:text="@string/brand" />

        <AutoCompleteTextView
            android:id="@id/editTextBrand"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            >

        </AutoCompleteTextView>
        </LinearLayout>

  ...more linearlayouts with textview and edittext to be spaced out evenly
4

4 に答える 4