[NUI] Fix Svace issues for Components
authorzhouleonlei <zhouleon.lei@samsung.com>
Mon, 23 Nov 2020 12:01:53 +0000 (20:01 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 26 Nov 2020 02:52:14 +0000 (11:52 +0900)
src/Tizen.NUI.Components/Controls/Pagination.cs
src/Tizen.NUI.Components/Controls/RecyclerView/RecyclerView.cs
src/Tizen.NUI.Components/Controls/ScrollableBase.cs

index 9638605..51da81b 100755 (executable)
@@ -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);
             }
index 2f3daab..6f54fb1 100755 (executable)
@@ -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.
index f2d8869..f652788 100755 (executable)
@@ -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)