- BoxView geometry issue
 - IsFocusAllowed platform specific issue
 - PropagateEvents Issue
This commit is contained in:
Seungkeun Lee 2018-05-25 23:37:13 +09:00 коммит произвёл Rui Marinho
Родитель 0ec51a727f
Коммит 4df442f5fb
10 изменённых файлов: 19 добавлений и 23 удалений

Просмотреть файл

@ -62,6 +62,7 @@ namespace Xamarin.Forms.Platform.Tizen
(renderer as LayoutRenderer)?.RegisterOnLayoutUpdated();
var nativeView = renderer.NativeView;
nativeView.PropagateEvents = false;
nativeView.MinimumHeight = pixelHeight;
_cacheCandidate[nativeView] = layout;
nativeView.Deleted += (sender, e) =>

Просмотреть файл

@ -48,7 +48,10 @@ namespace Xamarin.Forms.Platform.Tizen
if (Device.Idiom == TargetIdiom.TV)
{
((Check)nativeView).AllowFocus(false);
((Check)nativeView).PropagateEvents = true;
}
else
{
nativeView.PropagateEvents = false;
}
return nativeView;

Просмотреть файл

@ -49,6 +49,7 @@ namespace Xamarin.Forms.Platform.Tizen
height = height > 0 ? height : FindCellContentHeight(viewCell);
renderer.NativeView.MinimumHeight = Forms.ConvertToScaledPixel(height);
renderer.NativeView.PropagateEvents = false;
(renderer as LayoutRenderer)?.RegisterOnLayoutUpdated();
return renderer.NativeView;

Просмотреть файл

@ -41,6 +41,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native
Width = bound.Width;
Height = bound.Height;
Draw();
// It is workaround for fix geometry issue
// A polygon make a margin of 1 pixel at the outermost point
Geometry = bound;
}

Просмотреть файл

@ -23,10 +23,7 @@ namespace Xamarin.Forms.Platform.Tizen
{
if (Control == null)
{
SetNativeControl(new Native.Button(Forms.NativeParent)
{
PropagateEvents = false,
});
SetNativeControl(new Native.Button(Forms.NativeParent));
Control.Clicked += OnButtonClicked;
Control.Pressed += OnButtonPressed;
Control.Released += OnButtonReleased;

Просмотреть файл

@ -26,7 +26,6 @@ namespace Xamarin.Forms.Platform.Tizen
var entry = Device.Idiom == TargetIdiom.Phone || Device.Idiom == TargetIdiom.TV ? new Native.EditfieldEntry(Forms.NativeParent, "multiline") : new Native.Entry(Forms.NativeParent)
{
IsSingleLine = false,
PropagateEvents = false,
};
entry.Focused += OnFocused;
entry.Unfocused += OnUnfocused;

Просмотреть файл

@ -35,7 +35,6 @@ namespace Xamarin.Forms.Platform.Tizen
var entry = new Native.EditfieldEntry(Forms.NativeParent)
{
IsSingleLine = true,
PropagateEvents = false,
};
entry.SetVerticalTextAlignment("elm.text", 0.5);
entry.SetVerticalTextAlignment("elm.guide", 0.5);

Просмотреть файл

@ -16,10 +16,7 @@ namespace Xamarin.Forms.Platform.Tizen
{
if (Control == null)
{
SetNativeControl(new ESlider(Forms.NativeParent)
{
PropagateEvents = false,
});
SetNativeControl(new ESlider(Forms.NativeParent));
Control.ValueChanged += OnValueChanged;
_defaultMinColor = Control.GetPartColor("bar");
_defaultMaxColor = Control.GetPartColor("bg");

Просмотреть файл

@ -26,7 +26,6 @@ namespace Xamarin.Forms.Platform.Tizen
{
SetNativeControl(new Check(Forms.NativeParent)
{
PropagateEvents = false,
Style = SwitchStyle.Toggle
});
Control.StateChanged += OnStateChanged;

Просмотреть файл

@ -795,19 +795,16 @@ namespace Xamarin.Forms.Platform.Tizen
{
}
void UpdateFocusAllowed(bool initialize)
void UpdateFocusAllowed()
{
if (!initialize)
var widget = NativeView as Widget;
if (widget != null && Specific.IsFocusAllowed(Element).HasValue)
{
var widget = NativeView as Widget;
if (widget != null && Specific.IsFocusAllowed(Element).HasValue)
{
widget.AllowFocus((bool)Specific.IsFocusAllowed(Element));
}
else
{
Log.Warn("{0} uses {1} which does not support Focus management", this, NativeView);
}
widget.AllowFocus((bool)Specific.IsFocusAllowed(Element));
}
else
{
Log.Warn("{0} uses {1} which does not support Focus management", this, NativeView);
}
}