diff options
3 files changed, 21 insertions, 11 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/FormsApplication.cs b/Xamarin.Forms.Platform.Tizen/FormsApplication.cs index 57efa3f6..66467b7c 100644 --- a/Xamarin.Forms.Platform.Tizen/FormsApplication.cs +++ b/Xamarin.Forms.Platform.Tizen/FormsApplication.cs @@ -166,11 +166,11 @@ namespace Xamarin.Forms.Platform.Tizen { Native.Dialog alert = new Native.Dialog(Forms.Context.MainWindow); alert.Title = arguments.Title; + var message = arguments.Message.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace(Environment.NewLine, "<br>"); var label = new ELabel(alert) { - Text = "<span font_size=30 color=#000000>" + arguments.Message + "<\\span>", + Text = "<span font_size=30 color=#000000>" + message + "<\\span>", }; - label.Show(); var box = new Box(alert); diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs index 4508ccf1..6080d647 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/PickerRenderer.cs @@ -1,13 +1,14 @@ -using System; +using System; using System.ComponentModel; using System.Collections.Generic; using ElmSharp; -using EButton = ElmSharp.Button; +using EColor = ElmSharp.Color; namespace Xamarin.Forms.Platform.Tizen { - public class PickerRenderer : ViewRenderer<Picker, EButton> + public class PickerRenderer : ViewRenderer<Picker, Native.Button> { + static readonly EColor s_defaultTextColor = EColor.White; internal List _list; internal Native.Dialog _dialog; Dictionary<ListItem, int> _itemToItemNumber = new Dictionary<ListItem, int>(); @@ -20,7 +21,7 @@ namespace Xamarin.Forms.Platform.Tizen { if (Control == null) { - var button = new EButton(Forms.Context.MainWindow); + var button = new Native.Button(Forms.Context.MainWindow); SetNativeControl (button); } @@ -32,7 +33,7 @@ namespace Xamarin.Forms.Platform.Tizen if (e.NewElement != null) { UpdateSelectedIndex(); - + UpdateTextColor(); Control.Clicked += OnClick; } @@ -47,6 +48,10 @@ namespace Xamarin.Forms.Platform.Tizen { UpdateSelectedIndex(); } + else if (e.PropertyName == Picker.TextColorProperty.PropertyName) + { + UpdateTextColor(); + } } void UpdateSelectedIndex() @@ -55,6 +60,11 @@ namespace Xamarin.Forms.Platform.Tizen "" : Element.Items[Element.SelectedIndex]); } + void UpdateTextColor() + { + Control.TextColor = Element.TextColor.IsDefault ? s_defaultTextColor : Element.TextColor.ToNative(); + } + void OnClick(object sender, EventArgs e) { int i = 0; diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs index f35a2753..426cccaf 100644 --- a/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Renderers/ScrollViewRenderer.cs @@ -84,18 +84,18 @@ namespace Xamarin.Forms.Platform.Tizen { case ScrollOrientation.Horizontal: Control.ScrollBlock = ScrollBlock.Vertical; - Control.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible; + Control.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto; Control.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible; break; case ScrollOrientation.Vertical: Control.ScrollBlock = ScrollBlock.Horizontal; Control.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Invisible; - Control.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible; + Control.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto; break; default: Control.ScrollBlock = ScrollBlock.None; - Control.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible; - Control.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Visible; + Control.HorizontalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto; + Control.VerticalScrollBarVisiblePolicy = ScrollBarVisiblePolicy.Auto; break; } } |