我只是想将Holo EditText的背景改为绿色。我如何制作看起来像这样的定制Holo EditText
事情是这样的:http://tinypic.com/view.php?pic=2n20k8l&s=8#.U6hMQ_ldWSo
这可能是一个愚蠢的问题,但我搜索,没有结果!谢谢!
我只是想将Holo EditText的背景改为绿色。我如何制作看起来像这样的定制Holo EditText
事情是这样的:http://tinypic.com/view.php?pic=2n20k8l&s=8#.U6hMQ_ldWSo
这可能是一个愚蠢的问题,但我搜索,没有结果!谢谢!
下面是代码来实现你想要什么。
<RelativeLayout
android:id="@+id/one"
android:layout_width="250dp"
android:layout_height="55dp"
android:background="#006400" >
<EditText
android:id="@+id/editText1"
android:layout_width="220dp"
android:layout_height="45dp"
android:layout_centerInParent="true"
android:ems="10" >
<requestFocus />
</EditText>
</RelativeLayout>
谢谢队友! (Y) – Borzstag
在你的XML,属性添加到您的EditText:
android:background="@android:color/holo_green_dark"
OR
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/holo_green_dark">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="edit"
/>
</LinearLayout>
哪一个可以显示一些图像或链接? –
在布局的XML中试试'android:background =“#0f0”' – SMR
这个问题似乎是无关紧要的,因为它缺少足够的信息来识别问题。 – Raghunandan