mirror of
https://github.com/awatertrevi/xamarin-neo4j.git
synced 2026-09-22 09:05:29 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user