设置霍洛主题为Android应用程序 [英] Setting Holo theme for Android application

查看:149
本文介绍了设置霍洛主题为Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户名和密码,一个简单的登录屏幕。

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:

我期待更多这样的: <一href="http://developer.android.com/design/building-blocks/text-fields.html">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

这篇关于设置霍洛主题为Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆