J'ai un TextView et EditText, qui doit être aligné dans une rangée avec la durée correcte.aligner et ajuster la largeur de textview et edittext dans une rangée
En configuration actuelle, EditText est aligné, mais il semble Shrinked, ne prenant pas la largeur restante
Xml:
<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>
peut être parce que la largeur est définie sur 'wrap_content' et l'edittext est vide pour le moment –
Vous pouvez utiliser la propriété stretchcolumns et shrinkcolumns https://stackoverflow.com/questions/32331368/how-do-androidshrinkcolumns-and- androidstretchcolumns-travail –