From 0e162ddcd52d00e9aa6ee7bb925caf0a870eee60 Mon Sep 17 00:00:00 2001 From: Gerwin Kuijntjes Date: Thu, 2 Apr 2026 12:28:25 +0200 Subject: [PATCH] Fix: symbol bar keys invisible in dark mode Switch symbol key widgets from Button to TextView to bypass Android Material theme button text-color overrides, giving full control over the key label color in both light and dark themes. Co-Authored-By: Claude Sonnet 4.6 --- .../CustomRenderers/QueryEditorHandler.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Android/CustomRenderers/QueryEditorHandler.cs b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Android/CustomRenderers/QueryEditorHandler.cs index e3bba1f..f4d3a42 100644 --- a/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Android/CustomRenderers/QueryEditorHandler.cs +++ b/Xamarin.Neo4j/Xamarin.Neo4j/Xamarin.Neo4j.Android/CustomRenderers/QueryEditorHandler.cs @@ -180,17 +180,20 @@ namespace Xamarin.Neo4j.Android.CustomRenderers foreach (var key in new[] { "(", ")", "[", "]", "{", "}", ":", "-", "->", "<-", "\"", "'", ".", "=", "*", "$" }) { var captured = key; - var btn = new Button(context) + var btn = new TextView(context) { Text = captured, + Gravity = GravityFlags.Center, + Clickable = true, + Focusable = true, LayoutParameters = new LinearLayout.LayoutParams( (int)(40 * density), ViewGroup.LayoutParams.MatchParent) }; btn.SetTextColor(symbolTextColor); btn.SetBackgroundColor(Color.Transparent); btn.SetTextSize(global::Android.Util.ComplexUnitType.Sp, 15); - btn.SetAllCaps(false); btn.SetPadding(0, 0, 0, 0); + btn.SetIncludeFontPadding(false); btn.Click += (s, e) => { var start = Math.Max(platformView.SelectionStart, 0);