From 7da7a5082dc28a434776bb7f127b00955d7098f0 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 7 May 2022 23:51:00 +0200 Subject: Set the color of the navigation bar Since SDK 21, applications can set the background color of the navigation bar. This is normally simply an item in a theme but it is more complicated for keyboards. --- srcs/juloo.keyboard2/Theme.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'srcs/juloo.keyboard2/Theme.java') diff --git a/srcs/juloo.keyboard2/Theme.java b/srcs/juloo.keyboard2/Theme.java index 548e291..1461389 100644 --- a/srcs/juloo.keyboard2/Theme.java +++ b/srcs/juloo.keyboard2/Theme.java @@ -18,6 +18,9 @@ public class Theme public final float keyBorderRadius; + public final int colorNavBar; + public final boolean isLightNavBar; + private final Paint _keyLabelPaint; private final Paint _specialKeyLabelPaint; private final Paint _keySubLabelPaint; @@ -29,6 +32,8 @@ public class Theme keyBgPaint.setColor(s.getColor(R.styleable.keyboard_colorKey, 0)); keyDownBgPaint.setColor(s.getColor(R.styleable.keyboard_colorKeyActivated, 0)); // colorKeyboard = s.getColor(R.styleable.keyboard_colorKeyboard, 0); + colorNavBar = s.getColor(R.styleable.keyboard_navigationBarColor, 0); + isLightNavBar = s.getBoolean(R.styleable.keyboard_windowLightNavigationBar, false); labelColor = s.getColor(R.styleable.keyboard_colorLabel, 0); activatedColor = s.getColor(R.styleable.keyboard_colorLabelActivated, 0); lockedColor = s.getColor(R.styleable.keyboard_colorLabelLocked, 0); -- cgit v1.2.3