Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2691cdfa authored by helencheuk's avatar helencheuk
Browse files

Configured color attribute properly for focus outline

Bug: 310953377
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_focus_outline Development
Change-Id: If85c33ecea3241e69927917e910386d0346ef43b
parent 1438af66
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
    <attr name="overviewScrimColor" format="color" />
    <attr name="popupNotificationDotColor" format="color" />
    <attr name="notificationDotColor" format="color" />
    <attr name="focusOutlineColor" format="color" />

    <attr name="folderPaginationColor" format="color" />
    <attr name="folderPreviewColor" format="color" />
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
    <color name="uninstall_target_hover_tint">#FFF0592B</color>

    <color name="focused_background">#80c6c5c5</color>
    <color name="focus_outline_color">@color/material_color_on_secondary_container</color>

    <color name="default_shadow_color_no_alpha">#FF000000</color>

+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
        <item name="workspaceAmbientShadowColor">#40000000</item>
        <item name="workspaceKeyShadowColor">#89000000</item>
        <item name="widgetsTheme">@style/WidgetContainerTheme</item>
        <item name="focusOutlineColor">@color/material_color_on_secondary_container</item>
        <item name="folderPaginationColor">@color/folder_pagination_color_light</item>
        <item name="folderPreviewColor">@color/folder_preview_light</item>
        <item name="folderBackgroundColor">@color/folder_background_light</item>
+4 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.view.View.OnFocusChangeListener;

import com.android.launcher3.Flags;
import com.android.launcher3.R;
import com.android.launcher3.util.Themes;

/**
 * A helper class to draw background of a focused view.
@@ -30,8 +31,9 @@ public abstract class FocusIndicatorHelper extends ItemFocusIndicatorHelper<View
        implements OnFocusChangeListener {

    public FocusIndicatorHelper(View container) {
        super(container, container.getResources().getColor(Flags.enableFocusOutline()
                ? R.color.focus_outline_color : R.color.focused_background));
        super(container, Flags.enableFocusOutline() ? Themes.getAttrColor(container.getContext(),
                R.attr.focusOutlineColor)
                : container.getResources().getColor(R.color.focused_background));
    }

    @Override