Android默认主题 [英] Android default theme

查看:81
本文介绍了Android默认主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个Android应用程序,但我正在考虑主题..

I am making one android application but i was thinking about themes..

如果我未声明我的Android应用程序的主题,将使用哪个主题? 我在哪里可以找到此信息? 一个和另一个一起使用的标准是什么?

If i don't declare a theme of my Android application which theme will be used? Where i can find this information? What is the criteria for use one and other?

我在考虑,如果要自定义所有应用程序,则必须扩展一个主题并自定义要自定义的所有项目.

I was thinking about, if i want customize my all application, i have to extend one theme and custom all item that i want to customize.

如果假定其中之一为默认值怎么办?天气我必须再次对其进行自定义吗?我怎么知道默认值是什么?

And what if it assumes one of them as default? Weather I have to customize it again? How do i know what is the default one?

推荐答案

默认主题取决于API级别(与通用UI一致).

The default theme varies depending on the API level (to be consistent with the general UI).

在API上< 10,主题是一组样式(如下面的链接),称为Theme,在API 10上方,默认主题为Theme_Holo,现在,从API 21开始,默认主题已变为Theme.Material.

On API < 10, the theme was a set of styles (as in the link below) known as Theme, above that API 10, the default theme was Theme_Holo and now, starting with API 21, the default theme has become Theme.Material.

  • API < 10: see the frameworks's code Theme or Theme.AppCompat
  • 10 >= API < 21: read the Styles and Themes guide Holo_Theme or Theme.AppCompat
  • API >= 21 Using the Material Theme guide Theme.Material

大多数样式都可以通过android.support库获得.

Most of those styles are available through the android.support libraries.

PS: AFAIK浅色主题一直是默认主题.

PS: AFAIK the light theme has always been the default one.

这篇关于Android默认主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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