internal static void UpdateLottieView(Button button, ControlState previousState, LottieAnimationView lottieView)
{
var lottieStyle = ((ILottieButtonStyle)button.Style);
- if (lottieStyle.PlayRange != null && lottieStyle.PlayRange.GetValue(button.ControlState, out var result))
+ if (lottieStyle != null && lottieStyle.PlayRange != null && lottieStyle.PlayRange.GetValue(button.ControlState, out var result))
{
result.Show(lottieView, !previousState.Contains(ControlState.Pressed));
}
Relative cacheTo;
float RelativeOffsetFrom = propertyGetters.GetRelativeOffsetFrom(view);
float RelativeOffsetTo = propertyGetters.GetRelativeOffsetTo(view);
- float viewSize = propertyGetters.GetMeasuredSize(view.Layout);
+ float viewSize = view.Layout != null ? propertyGetters.GetMeasuredSize(view.Layout) : 0;
if (propertyGetters.GetTargetFrom(view) is View targetFrom && targetFrom != Owner)
{
}
var xNameToElementsOfOther = nameScopeOfOther?.NameToElement;
- var xNameToElements = nameScope.NameToElement;
+ var xNameToElements = nameScope?.NameToElement;
if (null != xNameToElements)
{
new LayoutLength(Padding.Top + Padding.Bottom),
new LayoutLength(child.HeightSpecification));
- childLayout.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
+ childLayout?.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
measureSize.width = childLayout.MeasuredWidth.Size.AsRoundedValue();
measureSize.height = childLayout.MeasuredHeight.Size.AsRoundedValue();
/// <since_tizen> 6 </since_tizen>
protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
{
- int widthSize;
+ int widthSize = 0;
int heightSize;
var widthMode = widthMeasureSpec.Mode;
var heightMode = heightMeasureSpec.Mode;
InitChildren(widthMeasureSpec, heightMeasureSpec);
if (widthMode == MeasureSpecification.ModeType.Exactly)
+ {
widthSize = (int)widthMeasureSpec.Size.AsRoundedValue();
+ }
else
- widthSize = (int)(hLocations[maxColumnConut] - hLocations[0] - columnSpacing);
+ {
+ if (hLocations.Length > maxColumnConut)
+ {
+ widthSize = (int)(hLocations[maxColumnConut] - hLocations[0] - columnSpacing);
+ }
+ }
if (heightMode == MeasureSpecification.ModeType.Exactly)
heightSize = (int)heightMeasureSpec.Size.AsRoundedValue();