我在布局中有 2 个 EditText。出于某种原因,当我在手机或模拟器(http://gyazo.com/7cb0d1d2c5807e65f65164957b4d13b8)上运行应用程序时,此处预览中显示的边框轮廓(http://gyazo.com/428bb31a974e43ccb52aaaee61f3b355)不显示。我想在预览屏幕中看到概述 Edittext 的框。
如果有人可以尝试看看问题出在哪里,那就太好了,谢谢。
包含 2 个 Edittext 的 XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_medium"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".List" >
<LinearLayout
android:id="@+id/Text1andText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="110dp"
android:layout_weight="50"
android:ems="10"
android:hint="@string/Text2" />
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="110dp"
android:layout_weight="50"
android:ems="10"
android:hint="@string/Text2" />
</LinearLayout>
</LinearLayout>
最佳答案
这是一个主题问题。您的设备正在使用 Holo 主题。尝试在您的应用程序 list 中根据需要更改您的主题 (ui.light/ui.dark)。
关于android - Edittext 轮廓框不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17704861/