47 lines
2.0 KiB
XML
47 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
||
Tencent is pleased to support the open source community by making QMUI_Android available.
|
||
|
||
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
|
||
|
||
Licensed under the MIT License (the "License"); you may not use this file except in
|
||
compliance with the License. You may obtain a copy of the License at
|
||
|
||
http://opensource.org/licenses/MIT
|
||
|
||
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
||
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||
either express or implied. See the License for the specific language governing permissions and
|
||
limitations under the License.
|
||
-->
|
||
|
||
<resources>
|
||
|
||
<!-- 关于Theme的继承关系:
|
||
由于 Theme 需要在不同 API Level 下有不同的配置,并且继承自不同的系统 Theme,所以多层继承。
|
||
|
||
继承关系和每个层的分工如下:
|
||
AppRootTheme(Theme 的最顶层,各个 API Level 自行决定继承自系统的哪个 Theme)
|
||
|-values
|
||
|-values-v21
|
||
|-values-...
|
||
|
|
||
AppBaseTheme(基础 Theme,定义所有公用的 style。)
|
||
|-values
|
||
|
|
||
AppConfigTheme(可配置的 Theme,各个 API Level 自行配置各自的 style 差异。)
|
||
|-values
|
||
|-values-v21
|
||
|-values-...
|
||
|
|
||
QMUI(QMUI提供的theme控制, 供外界使用)
|
||
|
||
So,
|
||
如果要对某 API Level 配置继承自某个系统的 Theme,在 values-v* 目录下修改 qmui_themes.xml 的 AppRootTheme。
|
||
如果要对某 API Level 配置定制化的 Theme,在 values-v* 目录下修改 qmui_themes.xml 的 AppConfigTheme。
|
||
如果在项目中要对特定项目配置业务相关的 Theme,在 values 目录下修改 themes.xml 的 AppTheme。
|
||
-->
|
||
|
||
<!--修改qmui库中的AppRootTheme,增加对MaterialComponents的支持,解决NavigationBarView的getOrCreateBadge方法时会报错-->
|
||
<style name="AppRootTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar" />
|
||
|
||
</resources> |