[Tizen] Fix minor bugs (#2830)
- BoxView geometry issue - IsFocusAllowed platform specific issue - PropagateEvents Issue
This commit is contained in:
Родитель
0ec51a727f
Коммит
4df442f5fb
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче