android - Edittext 轮廓框不可见

标签 android eclipse android-edittext

我在布局中有 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/

相关文章:

android - 用于文本选择控件的自定义 float 工具栏

android - 在 Android 中使用虚拟键盘捕捉按键?

java - 和引擎库上的颜色设置

android - mediaplayer seekTo() 以字节为单位的偏移量

java - 如何从客户端向服务器发送和接收多个数据

java - headless (headless) Eclipse 构建返回 ERRORLEVEL 13

Android EditText 文本的偏移量?

java - 使用对象列表填充 ListView

eclipse - 在子剪辑 : How do I connect an existing workspace with an existing repository

java - 使用 WizardPage 创建 eclipse 插件