Make navbar scrim taskbar background if taskbar is enabled.
This ensures the navbar buttons are visible on large screens where All Apps or Widgets picker are bottom sheets. Test: Scrim is taskbar background color on devices with taskbar. Bug: 264463659 Change-Id: I37890c0f542db625f9aeae7648bbaed064c4d240
This commit is contained in:
1 parent
d48a6fb4b7
commit
13e672aa76
3 files changed
+32
-3
No files matched your search
@@ -32,10 +32,13 @@ import android.util.AttributeSet;
|
||||
import android.util.SparseArray;
|
||||
import android.util.TypedValue;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
|
||||
import com.android.launcher3.LauncherPrefs;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.icons.GraphicsUtils;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
|
||||
/**
|
||||
* Various utility methods associated with theming.
|
||||
@@ -198,4 +201,12 @@ public class Themes {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Returns the desired navigation bar scrim color depending on the {@code DeviceProfile}. */
|
||||
@ColorInt
|
||||
public static <T extends Context & ActivityContext> int getNavBarScrimColor(T context) {
|
||||
return context.getDeviceProfile().isTaskbarPresent
|
||||
? context.getColor(R.color.taskbar_background)
|
||||
: Themes.getAttrColor(context, R.attr.allAppsNavBarScrimColor);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user