如何在两个edittext下划线之间实现无填充

How to achieve no padding between two edittext's underlines

下面是我当前布局的一部分

<LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginBottom="6dp"
                android:id="@+id/domainContainer"
                android:weightSum="1.0">
                <EditText
                    android:layout_width="wrap_content"
                    android:layout_height="44dp"
                    android:inputType="text|textNoSuggestions"
                    android:id="@+id/txtDomain"
                    android:theme="@style/LoginEditText"
                    android:drawableLeft="@drawable/ic_globe"
                    android:hint="@string/domain"
                    android:layout_marginRight="0dp"
                    android:textColorHint="#4F4F4F"
                    android:paddingRight="0dp"
                    android:textSize="16sp"
                    android:gravity="center_vertical|right" />
                <EditText
                    android:layout_weight="1.0"
                    android:layout_height="44dp"
                    android:paddingLeft="0dp"
                    android:layout_marginLeft="0dp"
                    android:inputType="none|textNoSuggestions"
                    android:id="@+id/txtHostname"
                    android:theme="@style/LoginEditText"
                    android:hint=".mydomain.com"
                    android:textColor="#9E9E9E"
                    android:textSize="16sp"
                    android:clickable="false"
                    android:cursorVisible="false"
                    android:focusable="false"
                    android:focusableInTouchMode="false"
                    android:layout_width="wrap_content"
                    android:layout_marginBottom="6dip"
                    android:gravity="center_vertical|left" />
            </LinearLayout>

我在两个 edittext 的文本之间有零填充,但是如何在两个 edittext 视图(即 的两个下划线 之间实现 零填充所以它看起来像一根长线下划线).

您可以尝试设置负边距以使编辑文本小部件更靠近。不过要小心,因为你可能会造成重叠。

android:layout_marginRight="-8dp"

也就是说,我不鼓励你这样做,因为当它看起来是一个时,用户可能会感到困惑,因为它有 2 个 edittext 视图。