gpt4 book ai didi

android - 如何获得系统定义的所有主题?

转载 作者:行者123 更新时间:2023-11-29 00:33:16 24 4
gpt4 key购买 nike

Question:- Does android provide any function to retrieve the all themes defined in the system.

示例:Theme_Holo_Light 或其他。

最佳答案

简答:否

Android 只有两个主题系列:

  • 主题
  • Theme.Holo

后者在 Android 3.0 Honeycomb API 11 中引入,您可以在 release notes 中了解

The standard system widgets and overall look have been redesigned and incorporate a new "holographic" user interface theme. The system applies the new theme using the standard style and theme system. Any application that targets the Android 3.0 platform—by setting either the android:minSdkVersion or android:targetSdkVersion value to "11"—inherits the holographic theme by default.

这些主题带有变体(基本上:浅色和深色)

所以当你设计一个主题时:

  • 要么从头开始创建一切
  • 要么继承自 Theme.DeviceDefault ,知道这将取决于每个设备的 Android 版本,因此您可以在 values-v11 中创建主题的变体。为全息

关于android - 如何获得系统定义的所有主题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14120055/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com