Issue
When a Xamarin.Forms Frame is selected, the default Android color is orange. For example:
<Frame
Margin="0"
Padding="0"
BackgroundColor="White"
CornerRadius="8"
HeightRequest="145"
HorizontalOptions="Center"
VerticalOptions="Center"
WidthRequest="150" />
How do I change this default color for my entire app?
Solution
Override the android:colorActivatedHighlight
value in the Resources/values/styles.xml
file in your Android project.
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
<!-- Sets Frame element border when selected -->
<item name="android:colorActivatedHighlight">@android:color/transparent</item>
</style>
...
</resources>
Answered By - Ryan Payne
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.