* Pixiview/UI/OptionCell.cs:
* Pixiview/UI/AdaptedPage.cs: * Pixiview/Utils/FileStore.cs: * Pixiview/Utils/IllustData.cs: * Pixiview/Illust/MainPage.xaml: * Pixiview/UI/Theme/LightTheme.cs: * Pixiview/Illust/MainPage.xaml.cs: * Pixiview.iOS/GlobalSuppressions.cs: * Pixiview/Illust/ViewIllustPage.xaml: * Pixiview.Android/GlobalSuppressions.cs: * Pixiview/Illust/ViewIllustPage.xaml.cs: * Pixiview/Illust/IllustCollectionPage.cs: * Pixiview.iOS/Renderers/SegmentedControlRenderer.cs: * Pixiview/Illust/RankingPage.xaml: * Pixiview/Illust/RankingPage.xaml.cs: * Pixiview.Android/Pixiview.Android.csproj: * Pixiview.Android/Resources/values/colors.xml: * Pixiview.Android/Resources/Resource.designer.cs: * Pixiview.Android/Resources/layout/RadioGroup.xml: * Pixiview.Android/Renderers/BlurryPanelRenderer.cs: * Pixiview.Android/Resources/layout/RadioButton.xml: * Pixiview.Android/Renderers/SegmentedControlRenderer.cs: * Pixiview.Android/Resources/color/segmented_control_text.xml: * Pixiview.Android/Resources/drawable/segmented_control_background.xml: * Pixiview.Android/Resources/drawable/segmented_control_last_background.xml: * Pixiview.Android/Resources/drawable/segmented_control_first_background.xml: segmented control for Android
This commit is contained in:
@ -30,7 +30,7 @@ namespace Pixiview.iOS.Renderers
|
||||
}
|
||||
|
||||
nativeControl.Enabled = element.IsEnabled;
|
||||
nativeControl.BackgroundColor = element.BackgroundColor.ToUIColor();
|
||||
//nativeControl.BackgroundColor = element.BackgroundColor.ToUIColor();
|
||||
nativeControl.SelectedSegmentTintColor = GetTintColor(element);
|
||||
SetTextColor();
|
||||
nativeControl.SelectedSegment = element.SelectedSegmentIndex;
|
||||
@ -68,9 +68,9 @@ namespace Pixiview.iOS.Renderers
|
||||
element.SendValueChanged();
|
||||
break;
|
||||
|
||||
case nameof(element.BackgroundColor):
|
||||
nativeControl.BackgroundColor = element.BackgroundColor.ToUIColor();
|
||||
break;
|
||||
//case nameof(element.BackgroundColor):
|
||||
// nativeControl.BackgroundColor = element.BackgroundColor.ToUIColor();
|
||||
// break;
|
||||
|
||||
case nameof(element.SelectedSegmentIndex):
|
||||
nativeControl.SelectedSegment = element.SelectedSegmentIndex;
|
||||
@ -93,8 +93,9 @@ namespace Pixiview.iOS.Renderers
|
||||
|
||||
private void SetTextColor()
|
||||
{
|
||||
var color = Element.SelectedTextColor;
|
||||
UIColor c = color == default ? UIColor.LabelColor : color.ToUIColor();
|
||||
//var color = Element.SelectedTextColor;
|
||||
//UIColor c = color == default ? UIColor.LabelColor : color.ToUIColor();
|
||||
UIColor c = UIColor.LabelColor;
|
||||
var attribute = new UITextAttributes
|
||||
{
|
||||
TextColor = c
|
||||
@ -111,27 +112,27 @@ namespace Pixiview.iOS.Renderers
|
||||
{
|
||||
if (element.IsEnabled)
|
||||
{
|
||||
var tintColor = element.TintColor;
|
||||
if (tintColor == default)
|
||||
{
|
||||
//var tintColor = element.TintColor;
|
||||
//if (tintColor == default)
|
||||
//{
|
||||
return UIColor.SystemGray6Color;
|
||||
}
|
||||
else
|
||||
{
|
||||
return tintColor.ToUIColor().ColorWithAlpha(.3f);
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return tintColor.ToUIColor().ColorWithAlpha(.3f);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
var disabledColor = element.DisabledColor;
|
||||
if (disabledColor == default)
|
||||
{
|
||||
//var disabledColor = element.DisabledColor;
|
||||
//if (disabledColor == default)
|
||||
//{
|
||||
return UIColor.SecondaryLabelColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
return disabledColor.ToUIColor();
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return disabledColor.ToUIColor();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user