私はTextViewとEditTextを持っていますが、これは適切なスパンで行を整列させる必要があります。現在のレイアウトで行内のtextviewとedittextの幅を調整して調整します。
、のEditTextが整列されていますが、縮め表示され、残りの幅
のXml取っていない:あなたはのEditTextが残りのスペースを埋めるためにしたい場合は
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:style="@style/AppTheme"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp">
<TableRow>
<TextView
style="@style/AppTheme.DetailInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Password:" />
<EditText
style="@style/AppTheme.TextBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:maxLines="1"
android:text= "@={profile.password}"/>
</TableRow>
</TableLayout>
幅が 'wrap_content'に設定されていて、edittextが瞬間に空である可能性があります –
stretchcolumnsとshrinkcolumnsプロパティを使用できます。https://stackoverflow.com/questions/32331368/how-do-androidshrinkcolumns-and- androidstretchcolumns-work –