From: zhouleonlei Date: Mon, 23 Nov 2020 12:01:53 +0000 (+0800) Subject: [NUI] Fix Svace issues for Components X-Git-Tag: submit/tizen_6.0/20201127.005224~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fac1fc0aed8afdd8919e8fd9f393bc91a82ff8f;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix Svace issues for Components --- diff --git a/src/Tizen.NUI.Components/Controls/Pagination.cs b/src/Tizen.NUI.Components/Controls/Pagination.cs index 9638605..51da81b 100755 --- a/src/Tizen.NUI.Components/Controls/Pagination.cs +++ b/src/Tizen.NUI.Components/Controls/Pagination.cs @@ -473,7 +473,7 @@ namespace Tizen.NUI.Components } ImageVisual indicator = new ImageVisual { - URL = paginationStyle.IndicatorImageUrl.Normal, + URL = paginationStyle.IndicatorImageUrl?.Normal, Size = new Size2D((int)paginationStyle.IndicatorSize.Width, (int)paginationStyle.IndicatorSize.Height), //TODO: Apply color properties from PaginationStyle class. MixColor = (indicatorColor == null) ? new Color(1.0f, 1.0f, 1.0f, 0.5f) : indicatorColor, @@ -511,7 +511,7 @@ namespace Tizen.NUI.Components for (int i = 0; i < indicatorList.Count; i++) { ImageVisual indicator = indicatorList[i]; - indicator.URL = paginationStyle.IndicatorImageUrl.Normal; + indicator.URL = paginationStyle.IndicatorImageUrl?.Normal; indicator.Size = new Size2D((int)paginationStyle.IndicatorSize.Width, (int)paginationStyle.IndicatorSize.Height); indicator.Position = new Position2D((int)(paginationStyle.IndicatorSize.Width + paginationStyle.IndicatorSpacing) * i, 0); } diff --git a/src/Tizen.NUI.Components/Controls/RecyclerView/RecyclerView.cs b/src/Tizen.NUI.Components/Controls/RecyclerView/RecyclerView.cs index 2f3daab..6f54fb1 100755 --- a/src/Tizen.NUI.Components/Controls/RecyclerView/RecyclerView.cs +++ b/src/Tizen.NUI.Components/Controls/RecyclerView/RecyclerView.cs @@ -278,7 +278,7 @@ namespace Tizen.NUI.Components } } - if (nextFocusedView) + if (nextFocusedView != null) { // Check next focused view is inside of visible area. // If it is not, move scroll position to make it visible. diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index f2d8869..f652788 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -180,8 +180,11 @@ namespace Tizen.NUI.Components ResolveSizeAndState(new LayoutLength(totalHeight), heightMeasureSpec, childHeightState)); // Size of ScrollableBase is changed. Change Page width too. - scrollableBase.mPageWidth = (int)MeasuredWidth.Size.AsRoundedValue(); - scrollableBase.OnScrollingChildRelayout(null, null); + if (scrollableBase != null) + { + scrollableBase.mPageWidth = (int)MeasuredWidth.Size.AsRoundedValue(); + scrollableBase.OnScrollingChildRelayout(null, null); + } } protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)