mirror of
https://github.com/awatertrevi/xamarin-neo4j.git
synced 2026-10-08 02:24:10 +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 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
66604f72a5
commit
0e162ddcd5
+5
-2
@@ -180,17 +180,20 @@ namespace Xamarin.Neo4j.Android.CustomRenderers
|
|||||||
foreach (var key in new[] { "(", ")", "[", "]", "{", "}", ":", "-", "->", "<-", "\"", "'", ".", "=", "*", "$" })
|
foreach (var key in new[] { "(", ")", "[", "]", "{", "}", ":", "-", "->", "<-", "\"", "'", ".", "=", "*", "$" })
|
||||||
{
|
{
|
||||||
var captured = key;
|
var captured = key;
|
||||||
var btn = new Button(context)
|
var btn = new TextView(context)
|
||||||
{
|
{
|
||||||
Text = captured,
|
Text = captured,
|
||||||
|
Gravity = GravityFlags.Center,
|
||||||
|
Clickable = true,
|
||||||
|
Focusable = true,
|
||||||
LayoutParameters = new LinearLayout.LayoutParams(
|
LayoutParameters = new LinearLayout.LayoutParams(
|
||||||
(int)(40 * density), ViewGroup.LayoutParams.MatchParent)
|
(int)(40 * density), ViewGroup.LayoutParams.MatchParent)
|
||||||
};
|
};
|
||||||
btn.SetTextColor(symbolTextColor);
|
btn.SetTextColor(symbolTextColor);
|
||||||
btn.SetBackgroundColor(Color.Transparent);
|
btn.SetBackgroundColor(Color.Transparent);
|
||||||
btn.SetTextSize(global::Android.Util.ComplexUnitType.Sp, 15);
|
btn.SetTextSize(global::Android.Util.ComplexUnitType.Sp, 15);
|
||||||
btn.SetAllCaps(false);
|
|
||||||
btn.SetPadding(0, 0, 0, 0);
|
btn.SetPadding(0, 0, 0, 0);
|
||||||
|
btn.SetIncludeFontPadding(false);
|
||||||
btn.Click += (s, e) =>
|
btn.Click += (s, e) =>
|
||||||
{
|
{
|
||||||
var start = Math.Max(platformView.SelectionStart, 0);
|
var start = Math.Max(platformView.SelectionStart, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user