replace qualified name with import

This commit is contained in:
Vologhat
2022-12-25 18:43:36 +03:00
parent 9db18f526a
commit 61b6b0a1ec
@@ -6,6 +6,7 @@ import android.util.SparseIntArray;
import androidx.annotation.IdRes;
import com.vtosters.lite.R;
import ru.vtosters.lite.utils.ThemesUtils;
@@ -36,42 +37,42 @@ public class ThemesCore {
ACCENT_THEME_ONLY_MILK_LIGHT.clear();
ACCENT_THEME_ONLY_MILK_DARK.clear();
ACCENT_THEME_ONLY_LIGHT.put(com.vtosters.lite.R.attr.attach_picker_tab_active_background, false);
ACCENT_THEME_ONLY_LIGHT.put(com.vtosters.lite.R.attr.attach_picker_tab_active_text, false);
ACCENT_THEME_ONLY_LIGHT.put(com.vtosters.lite.R.attr.newsfeed_action_color, false);
ACCENT_THEME_ONLY_LIGHT.put(R.attr.attach_picker_tab_active_background, false);
ACCENT_THEME_ONLY_LIGHT.put(R.attr.attach_picker_tab_active_text, false);
ACCENT_THEME_ONLY_LIGHT.put(R.attr.newsfeed_action_color, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(com.vtosters.lite.R.attr.header_background, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.header_background, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(com.vtosters.lite.R.attr.header_alternate_background, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.header_alternate_background, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(com.vtosters.lite.R.attr.header_background_before_blur, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.header_background_before_blur, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(com.vtosters.lite.R.attr.header_background_before_blur_alternate, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.header_background_before_blur_alternate, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(R.attr.header_background, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.header_background, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(R.attr.header_alternate_background, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.header_alternate_background, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(R.attr.header_background_before_blur, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.header_background_before_blur, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(R.attr.header_background_before_blur_alternate, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.header_background_before_blur_alternate, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(com.vtosters.lite.R.attr.header_tint, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(com.vtosters.lite.R.attr.header_tint_alternate, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(com.vtosters.lite.R.attr.toolbarIconsColor, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(com.vtosters.lite.R.attr.header_tab_active_indicator, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(com.vtosters.lite.R.attr.header_alternate_tab_active_indicator, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(R.attr.header_tint, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(R.attr.header_tint_alternate, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(R.attr.toolbarIconsColor, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(R.attr.header_tab_active_indicator, false);
ACCENT_THEME_ONLY_NOMILK_LIGHT.put(R.attr.header_alternate_tab_active_indicator, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(com.vtosters.lite.R.attr.im_dropdown_arrow_tint, false);
ACCENT_THEME_ONLY_MILK_LIGHT.put(R.attr.im_dropdown_arrow_tint, false);
ACCENT_THEME_ONLY_NOMILK.put(com.vtosters.lite.R.attr.im_dropdown_icon_color, false);
ACCENT_THEME_ONLY_NOMILK.put(R.attr.im_dropdown_icon_color, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.icon_name, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.text_name, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.button_primary_background, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.button_secondary_foreground, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.button_tertiary_foreground, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.button_muted_foreground, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.button_outline_border, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.newsfeed_post_title_color, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.counter_primary_background, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.action_sheet_action_foreground, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.im_bubble_wallpaper_outgoing, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.im_bubble_outgoing, false);
ACCENT_THEME_ONLY_DARK.put(com.vtosters.lite.R.attr.im_bubble_outgoing_highlighted, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.icon_name, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.text_name, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.button_primary_background, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.button_secondary_foreground, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.button_tertiary_foreground, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.button_muted_foreground, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.button_outline_border, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.newsfeed_post_title_color, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.counter_primary_background, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.action_sheet_action_foreground, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.im_bubble_wallpaper_outgoing, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.im_bubble_outgoing, false);
ACCENT_THEME_ONLY_DARK.put(R.attr.im_bubble_outgoing_highlighted, false);
}
public static void setThemedColors(int accentColor) {
@@ -80,71 +81,71 @@ public class ThemesCore {
cachedAccents = true;
themedColors.clear();
themedColors.put(com.vtosters.lite.R.attr.text_link, accentColor);
themedColors.put(com.vtosters.lite.R.attr.accent, accentColor);
themedColors.put(com.vtosters.lite.R.attr.newsfeed_dropdown_color, accentColor);
themedColors.put(com.vtosters.lite.R.attr.icon_name, accentColor);
themedColors.put(R.attr.text_link, accentColor);
themedColors.put(R.attr.accent, accentColor);
themedColors.put(R.attr.newsfeed_dropdown_color, accentColor);
themedColors.put(R.attr.icon_name, accentColor);
themedColors.put(com.vtosters.lite.R.attr.vk_accent, accentColor);
themedColors.put(com.vtosters.lite.R.attr.accentColor, accentColor);
themedColors.put(com.vtosters.lite.R.attr.text_name, accentColor);
themedColors.put(com.vtosters.lite.R.attr.tabbar_active_icon, accentColor);
themedColors.put(R.attr.vk_accent, accentColor);
themedColors.put(R.attr.accentColor, accentColor);
themedColors.put(R.attr.text_name, accentColor);
themedColors.put(R.attr.tabbar_active_icon, accentColor);
// themedColors.put(com.vtosters.lite.R.attr.header_background, accentColor);
// themedColors.put(com.vtosters.lite.R.attr.header_alternate_background, accentColor);
// themedColors.put(com.vtosters.lite.R.attr.header_background_before_blur, accentColor);
// themedColors.put(com.vtosters.lite.R.attr.header_background_before_blur_alternate, accentColor);
themedColors.put(com.vtosters.lite.R.attr.header_tint, accentColor);
themedColors.put(com.vtosters.lite.R.attr.header_tint_alternate, accentColor);
themedColors.put(com.vtosters.lite.R.attr.activity_indicator_tint, accentColor);
themedColors.put(com.vtosters.lite.R.attr.toolbarIconsColor, accentColor);
themedColors.put(R.attr.header_tint, accentColor);
themedColors.put(R.attr.header_tint_alternate, accentColor);
themedColors.put(R.attr.activity_indicator_tint, accentColor);
themedColors.put(R.attr.toolbarIconsColor, accentColor);
themedColors.put(com.vtosters.lite.R.attr.button_primary_background, accentColor);
themedColors.put(com.vtosters.lite.R.attr.button_secondary_foreground, accentColor);
themedColors.put(com.vtosters.lite.R.attr.button_tertiary_foreground, accentColor);
themedColors.put(com.vtosters.lite.R.attr.button_outline_border, accentColor);
themedColors.put(com.vtosters.lite.R.attr.button_muted_foreground, accentColor);
themedColors.put(com.vtosters.lite.R.attr.header_tab_active_indicator, accentColor);
themedColors.put(com.vtosters.lite.R.attr.header_alternate_tab_active_indicator, accentColor);
themedColors.put(R.attr.button_primary_background, accentColor);
themedColors.put(R.attr.button_secondary_foreground, accentColor);
themedColors.put(R.attr.button_tertiary_foreground, accentColor);
themedColors.put(R.attr.button_outline_border, accentColor);
themedColors.put(R.attr.button_muted_foreground, accentColor);
themedColors.put(R.attr.header_tab_active_indicator, accentColor);
themedColors.put(R.attr.header_alternate_tab_active_indicator, accentColor);
themedColors.put(com.vtosters.lite.R.attr.button_primary_background_disabled, mutedAccentColor);
themedColors.put(com.vtosters.lite.R.attr.button_secondary_foreground_disabled, mutedAccentColor);
themedColors.put(com.vtosters.lite.R.attr.button_tertiary_foreground_disabled, mutedAccentColor);
themedColors.put(com.vtosters.lite.R.attr.button_outline_border_disabled, mutedAccentColor);
themedColors.put(com.vtosters.lite.R.attr.button_muted_foreground_disabled, mutedAccentColor);
themedColors.put(R.attr.button_primary_background_disabled, mutedAccentColor);
themedColors.put(R.attr.button_secondary_foreground_disabled, mutedAccentColor);
themedColors.put(R.attr.button_tertiary_foreground_disabled, mutedAccentColor);
themedColors.put(R.attr.button_outline_border_disabled, mutedAccentColor);
themedColors.put(R.attr.button_muted_foreground_disabled, mutedAccentColor);
themedColors.put(com.vtosters.lite.R.attr.im_dropdown_icon_color, accentColor);
themedColors.put(com.vtosters.lite.R.attr.im_dropdown_arrow_tint, accentColor);
themedColors.put(R.attr.im_dropdown_icon_color, accentColor);
themedColors.put(R.attr.im_dropdown_arrow_tint, accentColor);
themedColors.put(com.vtosters.lite.R.attr.im_attach_tint, accentColor);
themedColors.put(com.vtosters.lite.R.attr.im_forward_line_tint, accentColor);
themedColors.put(com.vtosters.lite.R.attr.link_alternate, accentColor);
themedColors.put(com.vtosters.lite.R.attr.newsfeed_post_title_color, accentColor);
themedColors.put(R.attr.im_attach_tint, accentColor);
themedColors.put(R.attr.im_forward_line_tint, accentColor);
themedColors.put(R.attr.link_alternate, accentColor);
themedColors.put(R.attr.newsfeed_post_title_color, accentColor);
themedColors.put(com.vtosters.lite.R.attr.attach_picker_tab_active_background, accentColor);
themedColors.put(com.vtosters.lite.R.attr.attach_picker_tab_active_text, accentColor);
themedColors.put(com.vtosters.lite.R.attr.newsfeed_action_color, accentColor);
themedColors.put(com.vtosters.lite.R.attr.counter_primary_background, accentColor);
themedColors.put(R.attr.attach_picker_tab_active_background, accentColor);
themedColors.put(R.attr.attach_picker_tab_active_text, accentColor);
themedColors.put(R.attr.newsfeed_action_color, accentColor);
themedColors.put(R.attr.counter_primary_background, accentColor);
themedColors.put(com.vtosters.lite.R.attr.dynamic_blue, accentColor);
themedColors.put(R.attr.dynamic_blue, accentColor);
themedColors.put(com.vtosters.lite.R.attr.action_sheet_action_foreground, accentColor);
themedColors.put(R.attr.action_sheet_action_foreground, accentColor);
// messages
themedColors.put(com.vtosters.lite.R.attr.im_reply_separator, accentColor);
themedColors.put(com.vtosters.lite.R.attr.im_text_name, accentColor);
themedColors.put(R.attr.im_reply_separator, accentColor);
themedColors.put(R.attr.im_text_name, accentColor);
wallLightColor = ThemesUtils.lighten(accentColor, 0.67f);
themedColors.put(com.vtosters.lite.R.attr.im_ic_send_msg, accentColor);
themedColors.put(com.vtosters.lite.R.attr.im_bubble_wallpaper_outgoing, accentColor);
themedColors.put(com.vtosters.lite.R.attr.im_bubble_outgoing, accentColor);
themedColors.put(com.vtosters.lite.R.attr.im_bubble_outgoing_highlighted, accentColor);
themedColors.put(R.attr.im_ic_send_msg, accentColor);
themedColors.put(R.attr.im_bubble_wallpaper_outgoing, accentColor);
themedColors.put(R.attr.im_bubble_outgoing, accentColor);
themedColors.put(R.attr.im_bubble_outgoing_highlighted, accentColor);
}
public static int getThemedAttr(Context context, @IdRes int attr) {
if (attr == com.vtosters.lite.R.attr.im_bubble_wallpaper_outgoing || attr == com.vtosters.lite.R.attr.im_bubble_outgoing || attr == com.vtosters.lite.R.attr.im_bubble_outgoing_highlighted) {
if (attr == R.attr.im_bubble_wallpaper_outgoing || attr == R.attr.im_bubble_outgoing || attr == R.attr.im_bubble_outgoing_highlighted) {
return wallLightColor;
}