<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_label_client_host"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:text="@string/label_host" />
<EditText
android:id="@+id/et_client_host"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text"
android:layout_weight="1.0"
android:lines="1" />
</LinearLayout>
I expect EditText to fill the whole space remaining by horizontal, but TextView and EditText get 1/2 of available space. This LinearLayout is placed inside of another vertical LinearLayout.
remove the
android:ems="10"
for all the elements, I tested here and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With