Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Get the default app color

$
0
0

I made a simple popup that displays above current page and since I was working only on one mobile(device emulator) at the time I set up colors so I can see this popup. It was transparent by default. The problem arose when the app was viewed on an android that had light theme. Very bad! You see, light android has darker text color than dark android so I can't see the text.
Is there a way to read current default app color?

I tried doing this but withou success:
var themeAccentColor = new Android.Util.TypedValue();
this.Theme.ResolveAttribute(Resource.Attribute.colorPrimary, themeAccentColor, true);
C = new Android.Graphics.Color(themeAccentColor.Data);


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>