我有一个用户名和密码,一个简单的登录屏幕。
I have a simple login screen with username and password.
我想它显示在相同的方式的EditText
字段,您在河洛主题的冰淇淋三明治和蜂窝看到的。
I'd like it to show the EditText
fields in the same way as you see in the Holo theme on Ice Cream Sandwich and Honeycomb.
在我的清单文件我有
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo">
如果不是文本字段现在看起来不同,例如没有顶,左,右边界
Shouldn't the text fields now look different e.g. have no top, left and right borders?
矿似乎看起来是完全一样的。我敢肯定,我在做一些非常基本错误的,但任何建议表示欢迎。
Mine seem to look the exact same. I'm sure I'm doing something very basically wrong but any suggestions welcome.
这是我在模拟器中看到:
This is what I see in the emulator:
我期待更多这样的: http://developer.android.com/design/building-blocks/text-fields.html
推荐答案
原生Android的Holo主题是只为API等级11+。但是,有一个名为HoloEverywhere一个开源项目。
The original Android Holo Theme is just for API Level 11+. But there is an open source project called HoloEverywhere.
看看这个。这应该解决您的问题。
Take a look at this. This should solve your Problems.
所以,如果你refere它作为一个库,你可以设置你的主题是这样的:
So if you refere it as an Library you can set your Theme like this:
android:theme="@style/Theme.Holo
// or if you want to use the Holo light theme:
android:theme="@style/Theme.Holo.Light
相关推荐
最新文章