私はRelativeLayout
のAndroidアプリケーションにマルチラインEditText
を持っています。それ自体はGridLayout
の子で、2列あります。各RelativeLayout
には1のcolumnWeightがあり、その結果2つのEditText
が画面の半分を占めます。各レイアウトの幅は、重みが優先されるように0dpに設定されます。RelativeLayoutのAndroid EditTextがあまりにも速く広がっています
各RelativeLayout
の高さは、wrap_content
に設定され、EditTexts自体の高さも同じです。私はRelativeLayout
の高さがEditText
で直線的に拡大すると期待していますが、それはそうではないようです。代わりに、8文字の英字がRelativeLayout
の高さをほぼ4倍にするように、1行の高さをおよそ1文字おきにレイアウトします。私の腸はそれが重み付け/幅と関係があると私に言っていますが、私はそれを確認するために何かオンラインで見つけることができません。なぜこうなった?
<GridLayout
android:id="@+id/proficiencyGrid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/featuresWrapper"
android:layout_centerHorizontal="true"
android:columnCount="2"
android:orientation="horizontal"
android:rowCount="6" >
....
<RelativeLayout
android:id="@+id/personalityWrapper"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_column="0"
android:layout_columnWeight="1"
android:layout_gravity="fill"
android:layout_row="4" >
....
<EditText
android:id="@+id/personalityDialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/personalitySeparator"
android:inputType="textMultiLine"
android:padding="15dp"
android:textColor="@android:color/white"
android:textSize="16sp" >