diff options
Diffstat (limited to 'partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfig.java')
-rw-r--r-- | partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfig.java | 237 |
1 files changed, 234 insertions, 3 deletions
diff --git a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfig.java b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfig.java index 56256c9..280ab81 100644 --- a/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfig.java +++ b/partnerconfig/java/com/google/android/setupcompat/partnerconfig/PartnerConfig.java @@ -30,9 +30,16 @@ public enum PartnerConfig { // Navigation bar background color CONFIG_NAVIGATION_BAR_BG_COLOR(PartnerConfigKey.KEY_NAVIGATION_BAR_BG_COLOR, ResourceType.COLOR), + // Navigation bar divider color + CONFIG_NAVIGATION_BAR_DIVIDER_COLOR( + PartnerConfigKey.KEY_NAVIGATION_BAR_DIVIDER_COLOR, ResourceType.COLOR), + // Background color of the footer bar. CONFIG_FOOTER_BAR_BG_COLOR(PartnerConfigKey.KEY_FOOTER_BAR_BG_COLOR, ResourceType.COLOR), + // The min height of the footer buttons + CONFIG_FOOTER_BAR_MIN_HEIGHT(PartnerConfigKey.KEY_FOOTER_BAR_MIN_HEIGHT, ResourceType.DIMENSION), + // The same as "windowLightNavigationBar". If set true, the navigation bar icons will be drawn // such that it is compatible with a light navigation bar background. CONFIG_LIGHT_NAVIGATION_BAR(PartnerConfigKey.KEY_LIGHT_NAVIGATION_BAR, ResourceType.BOOL), @@ -89,10 +96,18 @@ public enum PartnerConfig { CONFIG_FOOTER_BUTTON_RIPPLE_COLOR_ALPHA( PartnerConfigKey.KEY_FOOTER_BUTTON_RIPPLE_ALPHA, ResourceType.FRACTION), - // Text size of the primary footer button + // Text size of the footer buttons CONFIG_FOOTER_BUTTON_TEXT_SIZE( PartnerConfigKey.KEY_FOOTER_BUTTON_TEXT_SIZE, ResourceType.DIMENSION), + // The text style of footer buttons {0 = NORMAL}, {1 = BOLD}, {2 = ITALIC}, {3 = BOLD_ITALIC} + CONFIG_FOOTER_BUTTON_TEXT_STYLE( + PartnerConfigKey.KEY_FOOTER_BUTTON_TEXT_STYLE, ResourceType.INTEGER), + + // The min height of the footer buttons + CONFIG_FOOTER_BUTTON_MIN_HEIGHT( + PartnerConfigKey.KEY_FOOTER_BUTTON_MIN_HEIGHT, ResourceType.DIMENSION), + // Disabled background alpha of the footer buttons CONFIG_FOOTER_BUTTON_DISABLED_ALPHA( PartnerConfigKey.KEY_FOOTER_BUTTON_DISABLED_ALPHA, ResourceType.FRACTION), @@ -120,6 +135,12 @@ public enum PartnerConfig { // Background color of layout CONFIG_LAYOUT_BACKGROUND_COLOR(PartnerConfigKey.KEY_LAYOUT_BACKGROUND_COLOR, ResourceType.COLOR), + // Margin start of the layout + CONFIG_LAYOUT_MARGIN_START(PartnerConfigKey.KEY_LAYOUT_MARGIN_START, ResourceType.DIMENSION), + + // Margin end of the layout + CONFIG_LAYOUT_MARGIN_END(PartnerConfigKey.KEY_LAYOUT_MARGIN_END, ResourceType.DIMENSION), + // Text color of the header CONFIG_HEADER_TEXT_COLOR(PartnerConfigKey.KEY_HEADER_TEXT_COLOR, ResourceType.COLOR), @@ -129,13 +150,50 @@ public enum PartnerConfig { // Font family of the header CONFIG_HEADER_FONT_FAMILY(PartnerConfigKey.KEY_HEADER_FONT_FAMILY, ResourceType.STRING), + // Margin top of the header text + CONFIG_HEADER_TEXT_MARGIN_TOP( + PartnerConfigKey.KEY_HEADER_TEXT_MARGIN_TOP, ResourceType.DIMENSION), + + // Margin bottom of the header text + CONFIG_HEADER_TEXT_MARGIN_BOTTOM( + PartnerConfigKey.KEY_HEADER_TEXT_MARGIN_BOTTOM, ResourceType.DIMENSION), + // Gravity of the header, icon and description CONFIG_LAYOUT_GRAVITY(PartnerConfigKey.KEY_LAYOUT_GRAVITY, ResourceType.STRING), + // Margin top of the icon + CONFIG_ICON_MARGIN_TOP(PartnerConfigKey.KEY_ICON_MARGIN_TOP, ResourceType.DIMENSION), + + // Size of the icon + CONFIG_ICON_SIZE(PartnerConfigKey.KEY_ICON_SIZE, ResourceType.DIMENSION), + // Background color of the header area CONFIG_HEADER_AREA_BACKGROUND_COLOR( PartnerConfigKey.KEY_HEADER_AREA_BACKGROUND_COLOR, ResourceType.COLOR), + // Margin bottom of the header container + CONFIG_HEADER_CONTAINER_MARGIN_BOTTOM( + PartnerConfigKey.KEY_HEADER_CONTAINER_MARGIN_BOTTOM, ResourceType.DIMENSION), + + // Auto text size enabled status + CONFIG_HEADER_AUTO_SIZE_ENABLED(PartnerConfigKey.KEY_HEADER_AUTO_SIZE_ENABLED, ResourceType.BOOL), + + // Max text size of header when auto size enabled. Ignored if auto size is false. + CONFIG_HEADER_AUTO_SIZE_MAX_TEXT_SIZE( + PartnerConfigKey.KEY_HEADER_AUTO_SIZE_MAX_TEXT_SIZE, ResourceType.DIMENSION), + + // Min text size of header when auto size enabled. Ignored if auto size is false. + CONFIG_HEADER_AUTO_SIZE_MIN_TEXT_SIZE( + PartnerConfigKey.KEY_HEADER_AUTO_SIZE_MIN_TEXT_SIZE, ResourceType.DIMENSION), + + // The max lines of the max text size when auto size enabled. Ignored if auto size is false. + CONFIG_HEADER_AUTO_SIZE_MAX_LINE_OF_MAX_SIZE( + PartnerConfigKey.KEY_HEADER_AUTO_SIZE_MAX_LINE_OF_MAX_SIZE, ResourceType.INTEGER), + + // Extra line spacing of header when auto size enabled. Ignored if auto size is false. + CONFIG_HEADER_AUTO_SIZE_LINE_SPACING_EXTRA( + PartnerConfigKey.KEY_HEADER_AUTO_SIZE_LINE_SPACING_EXTRA, ResourceType.DIMENSION), + // Text size of the description CONFIG_DESCRIPTION_TEXT_SIZE(PartnerConfigKey.KEY_DESCRIPTION_TEXT_SIZE, ResourceType.DIMENSION), @@ -149,6 +207,14 @@ public enum PartnerConfig { // Font family of the description CONFIG_DESCRIPTION_FONT_FAMILY(PartnerConfigKey.KEY_DESCRIPTION_FONT_FAMILY, ResourceType.STRING), + // Margin top of the description text + CONFIG_DESCRIPTION_TEXT_MARGIN_TOP( + PartnerConfigKey.KEY_DESCRIPTION_TEXT_MARGIN_TOP, ResourceType.DIMENSION), + + // Margin bottom of the description text + CONFIG_DESCRIPTION_TEXT_MARGIN_BOTTOM( + PartnerConfigKey.KEY_DESCRIPTION_TEXT_MARGIN_BOTTOM, ResourceType.DIMENSION), + // Text size of the body content text CONFIG_CONTENT_TEXT_SIZE(PartnerConfigKey.KEY_CONTENT_TEXT_SIZE, ResourceType.DIMENSION), @@ -164,6 +230,75 @@ public enum PartnerConfig { // Gravity of the body content text CONFIG_CONTENT_LAYOUT_GRAVITY(PartnerConfigKey.KEY_CONTENT_LAYOUT_GRAVITY, ResourceType.STRING), + // The padding top of the content + CONFIG_CONTENT_PADDING_TOP(PartnerConfigKey.KEY_CONTENT_PADDING_TOP, ResourceType.DIMENSION), + + // The text size of the content info. + CONFIG_CONTENT_INFO_TEXT_SIZE( + PartnerConfigKey.KEY_CONTENT_INFO_TEXT_SIZE, ResourceType.DIMENSION), + + // The font family of the content info. + CONFIG_CONTENT_INFO_FONT_FAMILY( + PartnerConfigKey.KEY_CONTENT_INFO_FONT_FAMILY, ResourceType.STRING), + + // The text line spacing extra of the content info. + CONFIG_CONTENT_INFO_LINE_SPACING_EXTRA( + PartnerConfigKey.KEY_CONTENT_INFO_LINE_SPACING_EXTRA, ResourceType.DIMENSION), + + // The icon size of the content info. + CONFIG_CONTENT_INFO_ICON_SIZE( + PartnerConfigKey.KEY_CONTENT_INFO_ICON_SIZE, ResourceType.DIMENSION), + + // The icon margin end of the content info. + CONFIG_CONTENT_INFO_ICON_MARGIN_END( + PartnerConfigKey.KEY_CONTENT_INFO_ICON_MARGIN_END, ResourceType.DIMENSION), + + // The padding top of the content info. + CONFIG_CONTENT_INFO_PADDING_TOP( + PartnerConfigKey.KEY_CONTENT_INFO_PADDING_TOP, ResourceType.DIMENSION), + + // The padding bottom of the content info. + CONFIG_CONTENT_INFO_PADDING_BOTTOM( + PartnerConfigKey.KEY_CONTENT_INFO_PADDING_BOTTOM, ResourceType.DIMENSION), + + // The title text size of list items. + CONFIG_ITEMS_TITLE_TEXT_SIZE(PartnerConfigKey.KEY_ITEMS_TITLE_TEXT_SIZE, ResourceType.DIMENSION), + + // The summary text size of list items. + CONFIG_ITEMS_SUMMARY_TEXT_SIZE( + PartnerConfigKey.KEY_ITEMS_SUMMARY_TEXT_SIZE, ResourceType.DIMENSION), + + // The summary margin top of list items. + CONFIG_ITEMS_SUMMARY_MARGIN_TOP( + PartnerConfigKey.KEY_ITEMS_SUMMARY_MARGIN_TOP, ResourceType.DIMENSION), + + // The title font family of list items. + CONFIG_ITEMS_TITLE_FONT_FAMILY(PartnerConfigKey.KEY_ITEMS_TITLE_FONT_FAMILY, ResourceType.STRING), + + // The summary font family of list items. + CONFIG_ITEMS_SUMMARY_FONT_FAMILY( + PartnerConfigKey.KEY_ITEMS_SUMMARY_FONT_FAMILY, ResourceType.STRING), + + // The padding top of list items. + CONFIG_ITEMS_PADDING_TOP(PartnerConfigKey.KEY_ITEMS_PADDING_TOP, ResourceType.DIMENSION), + + // The padding bottom of list items. + CONFIG_ITEMS_PADDING_BOTTOM(PartnerConfigKey.KEY_ITEMS_PADDING_BOTTOM, ResourceType.DIMENSION), + + // The minimum height of list items. + CONFIG_ITEMS_MIN_HEIGHT(PartnerConfigKey.KEY_ITEMS_MIN_HEIGHT, ResourceType.DIMENSION), + + // The divider of list items are showing on the pages. + CONFIG_ITEMS_DIVIDER_SHOWN(PartnerConfigKey.KEY_ITEMS_DIVIDER_SHOWN, ResourceType.BOOL), + + // The intrinsic width of the card view for foldabe/tablet. + CONFIG_CARD_VIEW_INTRINSIC_WIDTH( + PartnerConfigKey.KEY_CARD_VIEW_INTRINSIC_WIDTH, ResourceType.DIMENSION), + + // The intrinsic height of the card view for foldabe/tablet. + CONFIG_CARD_VIEW_INTRINSIC_HEIGHT( + PartnerConfigKey.KEY_CARD_VIEW_INTRINSIC_HEIGHT, ResourceType.DIMENSION), + // The animation of loading screen used in those activities which is non of below type. CONFIG_PROGRESS_ILLUSTRATION_DEFAULT( PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_DEFAULT, ResourceType.ILLUSTRATION), @@ -184,9 +319,104 @@ public enum PartnerConfig { CONFIG_PROGRESS_ILLUSTRATION_UPDATE( PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_UPDATE, ResourceType.ILLUSTRATION), + // The animation of loading screen used in those activities which is finishing setup. + // For example:com.google.android.setupwizard.FINAL_HOLD + CONFIG_PROGRESS_ILLUSTRATION_FINAL_HOLD( + PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_FINAL_HOLD, ResourceType.ILLUSTRATION), + + // The animation of loading screen to define how long showing on the pages. CONFIG_PROGRESS_ILLUSTRATION_DISPLAY_MINIMUM_MS( - PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_DISPLAY_MINIMUM_MS, ResourceType.INTEGER); + PartnerConfigKey.KEY_PROGRESS_ILLUSTRATION_DISPLAY_MINIMUM_MS, ResourceType.INTEGER), + + // The animation for S+ devices used in those screens waiting for non of below type. + CONFIG_LOADING_LOTTIE_DEFAULT( + PartnerConfigKey.KEY_LOADING_LOTTIE_DEFAULT, ResourceType.ILLUSTRATION), + + // The animation for S+ devices used in those screens which is processing account info or related + // functions. + // For example:com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT + CONFIG_LOADING_LOTTIE_ACCOUNT( + PartnerConfigKey.KEY_LOADING_LOTTIE_ACCOUNT, ResourceType.ILLUSTRATION), + + // The animation for S+ devices used in those screens which is processing data connection. + // For example:com.android.setupwizard.CAPTIVE_PORTAL + CONFIG_LOADING_LOTTIE_CONNECTION( + PartnerConfigKey.KEY_LOADING_LOTTIE_CONNECTION, ResourceType.ILLUSTRATION), + + // The animation for S+ devices used in those screens which is updating devices. + // For example:com.google.android.setupwizard.COMPAT_EARLY_UPDATE + CONFIG_LOADING_LOTTIE_UPDATE( + PartnerConfigKey.KEY_LOADING_LOTTIE_UPDATE, ResourceType.ILLUSTRATION), + + // The animation for S+ devices used in those screens which is updating devices. + // For example:com.google.android.setupwizard.COMPAT_EARLY_UPDATE + CONFIG_LOADING_LOTTIE_FINAL_HOLD( + PartnerConfigKey.KEY_LOADING_LOTTIE_FINAL_HOLD, ResourceType.ILLUSTRATION), + + // The transition type to decide the transition between activities or fragments. + CONFIG_TRANSITION_TYPE(PartnerConfigKey.KEY_TRANSITION_TYPE, ResourceType.INTEGER), + + // The list of keypath and color map, applied to default animation when light theme. + CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_DEFAULT( + PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_DEFAULT, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to account animation when light theme. + CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_ACCOUNT( + PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_ACCOUNT, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to connection animation when light theme. + CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_CONNECTION( + PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_CONNECTION, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to update animation when light theme. + CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_UPDATE( + PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_UPDATE, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to update animation when light theme. + CONFIG_LOTTIE_LIGHT_THEME_CUSTOMIZATION_FINAL_HOLD( + PartnerConfigKey.KEY_LOADING_LIGHT_THEME_CUSTOMIZATION_FINAL_HOLD, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to default animation when dark theme. + CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_DEFAULT( + PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_DEFAULT, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to account animation when dark theme. + CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_ACCOUNT( + PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_ACCOUNT, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to connection animation when dark theme. + CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_CONNECTION( + PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_CONNECTION, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to update animation when dark theme. + CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_UPDATE( + PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_UPDATE, ResourceType.STRING_ARRAY), + + // The list of keypath and color map, applied to final hold animation when dark theme. + CONFIG_LOTTIE_DARK_THEME_CUSTOMIZATION_FINAL_HOLD( + PartnerConfigKey.KEY_LOADING_DARK_THEME_CUSTOMIZATION_FINAL_HOLD, ResourceType.STRING_ARRAY), + + // The padding top of the content frame of loading layout. + CONFIG_LOADING_LAYOUT_PADDING_TOP( + PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_TOP, ResourceType.DIMENSION), + + // The padding start of the content frame of loading layout. + CONFIG_LOADING_LAYOUT_PADDING_START( + PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_START, ResourceType.DIMENSION), + + // The padding end of the content frame of loading layout. + CONFIG_LOADING_LAYOUT_PADDING_END( + PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_END, ResourceType.DIMENSION), + + // The padding bottom of the content frame of loading layout. + CONFIG_LOADING_LAYOUT_PADDING_BOTTOM( + PartnerConfigKey.KEY_LOADING_LAYOUT_CONTENT_PADDING_BOTTOM, ResourceType.DIMENSION), + + // The height of the header of the loading layout. + CONFIG_LOADING_LAYOUT_HEADER_HEIGHT( + PartnerConfigKey.KEY_LOADING_LAYOUT_HEADER_HEIGHT, ResourceType.DIMENSION); + /** Resource type of the partner resources type. */ public enum ResourceType { INTEGER, BOOL, @@ -195,7 +425,8 @@ public enum PartnerConfig { STRING, DIMENSION, FRACTION, - ILLUSTRATION; + ILLUSTRATION, + STRING_ARRAY } private final String resourceName; |