• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.car.setupwizardlib.partner;
18 
19 /** Resources that can be customized by partner overlay APK. */
20 public enum PartnerConfig {
21 
22     CONFIG_IS_IMMERSIVE(
23             PartnerConfigKey.KEY_IS_IMMERSIVE, ResourceType.BOOLEAN),
24 
25     CONFIG_TOOLBAR_BG_COLOR(
26             PartnerConfigKey.KEY_TOOLBAR_BG_COLOR, ResourceType.COLOR),
27 
28     CONFIG_TOOLBAR_BUTTON_ICON_BACK(
29             PartnerConfigKey.KEY_TOOLBAR_BUTTON_ICON_BACK, ResourceType.DRAWABLE),
30 
31     CONFIG_TOOLBAR_BUTTON_FONT_FAMILY(
32             PartnerConfigKey.KEY_TOOLBAR_BUTTON_FONT_FAMILY, ResourceType.STRING),
33 
34     CONFIG_TOOLBAR_BUTTON_PADDING_HORIZONTAL(
35             PartnerConfigKey.KEY_TOOLBAR_BUTTON_PADDING_HORIZONTAL, ResourceType.DIMENSION),
36 
37     CONFIG_TOOLBAR_BUTTON_PADDING_VERTICAL(
38             PartnerConfigKey.KEY_TOOLBAR_BUTTON_PADDING_VERTICAL, ResourceType.DIMENSION),
39 
40     CONFIG_TOOLBAR_BUTTON_RADIUS(
41             PartnerConfigKey.KEY_TOOLBAR_BUTTON_RADIUS, ResourceType.DIMENSION),
42 
43     CONFIG_TOOLBAR_BUTTON_SPACING(
44             PartnerConfigKey.KEY_TOOLBAR_BUTTON_SPACING, ResourceType.DIMENSION),
45 
46     CONFIG_TOOLBAR_BUTTON_TEXT_SIZE(
47             PartnerConfigKey.KEY_TOOLBAR_BUTTON_TEXT_SIZE, ResourceType.DIMENSION),
48 
49     CONFIG_TOOLBAR_PRIMARY_BUTTON_BG(
50             PartnerConfigKey.KEY_TOOLBAR_PRIMARY_BUTTON_BG, ResourceType.DRAWABLE),
51 
52     CONFIG_TOOLBAR_PRIMARY_BUTTON_BG_COLOR(
53             PartnerConfigKey.KEY_TOOLBAR_PRIMARY_BUTTON_BG_COLOR, ResourceType.COLOR),
54 
55     CONFIG_TOOLBAR_PRIMARY_BUTTON_TEXT_COLOR(
56             PartnerConfigKey.KEY_TOOLBAR_PRIMARY_BUTTON_TEXT_COLOR, ResourceType.COLOR),
57 
58     CONFIG_TOOLBAR_SECONDARY_BUTTON_BG(
59             PartnerConfigKey.KEY_TOOLBAR_SECONDARY_BUTTON_BG, ResourceType.DRAWABLE),
60 
61     CONFIG_TOOLBAR_SECONDARY_BUTTON_BG_COLOR(
62             PartnerConfigKey.KEY_TOOLBAR_SECONDARY_BUTTON_BG_COLOR, ResourceType.COLOR),
63 
64     CONFIG_TOOLBAR_SECONDARY_BUTTON_TEXT_COLOR(
65             PartnerConfigKey.KEY_TOOLBAR_SECONDARY_BUTTON_TEXT_COLOR, ResourceType.COLOR),
66 
67     CONFIG_LOADING_INDICATOR_COLOR(
68             PartnerConfigKey.KEY_LOADING_INDICATOR_COLOR, ResourceType.COLOR),
69 
70     CONFIG_LAYOUT_BG_COLOR(
71             PartnerConfigKey.KEY_LAYOUT_BG_COLOR, ResourceType.COLOR);
72 
73     public enum ResourceType {
74         COLOR,
75         DRAWABLE,
76         STRING,
77         DIMENSION,
78         BOOLEAN,
79     }
80 
81     private final String mResourceName;
82     private final ResourceType mResourceType;
83 
getResourceType()84     public ResourceType getResourceType() {
85         return mResourceType;
86     }
87 
getResourceName()88     public String getResourceName() {
89         return mResourceName;
90     }
91 
PartnerConfig(@artnerConfigKey String resourceName, ResourceType type)92     PartnerConfig(@PartnerConfigKey String resourceName, ResourceType type) {
93         this.mResourceName = resourceName;
94         this.mResourceType = type;
95     }
96 }
97