[NUI] Fix Dropdown runtime error (#1232)
authorneostom432 <31119276+neostom432@users.noreply.github.com>
Mon, 23 Dec 2019 10:16:59 +0000 (19:16 +0900)
committerGitHub <noreply@github.com>
Mon, 23 Dec 2019 10:16:59 +0000 (19:16 +0900)
Reviewed and Verified with Sample

src/Tizen.NUI.Components/Controls/DropDown.cs

index d4e0b50..b25d4f3 100755 (executable)
@@ -120,7 +120,7 @@ namespace Tizen.NUI.Components
         private TextLabel buttonText = null;
         private ImageView listBackgroundImage = null;
         // Component that scrolls the child added to it.
-        private Scrollable scrollable = null;
+        private ScrollableBase scrollableBase = null;
 
         // The LinearLayout container to house the items in the drop down list.
         private View dropDownMenuFullList = null;
@@ -351,7 +351,7 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void AttachScrollBar(ScrollBar scrollBar)
         {
-            if (scrollable == null)
+            if (scrollableBase == null)
             {
                 return;
             }
@@ -366,7 +366,7 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public void DetachScrollBar()
         {
-            if (scrollable == null)
+            if (scrollableBase == null)
             {
                 return;
             }
@@ -387,7 +387,7 @@ namespace Tizen.NUI.Components
                 CreateButton();
 
                 CreateListBackgroundImage();
-                if (null == scrollable) // scrollable used to test of ListContainer Setup invoked already
+                if (null == scrollableBase) // scrollableBase used to test of ListContainer Setup invoked already
                 {
                     SetUpListContainer();
                 }
@@ -406,11 +406,11 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected void UpdateDropDown()
         {
-            if (null == scrollable || null == listBackgroundImage || null == dropDownMenuFullList) return;
+            if (null == scrollableBase || null == listBackgroundImage || null == dropDownMenuFullList) return;
             if (null == Style.ListBackgroundImage.Size) return;
             // Resize and position scrolling list within the drop down list container.  Can be used to position list in relation to the background image.
-            scrollable.Size = Style.ListBackgroundImage.Size - new Size((listPadding.Start + listPadding.End), (listPadding.Top + listPadding.Bottom), 0);
-            scrollable.Position2D = new Position2D(listPadding.Start, listPadding.Top);
+            scrollableBase.Size = Style.ListBackgroundImage.Size - new Size((listPadding.Start + listPadding.End), (listPadding.Top + listPadding.Bottom), 0);
+            scrollableBase.Position2D = new Position2D(listPadding.Start, listPadding.Top);
 
             int listBackgroundImageX = 0;
             int listBackgroundImageY = 0;
@@ -474,7 +474,7 @@ namespace Tizen.NUI.Components
                 Utility.Dispose(headerText);
                 Utility.Dispose(buttonText);
                 Utility.Dispose(button);
-                Utility.Dispose(scrollable);
+                Utility.Dispose(scrollableBase);
                 Utility.Dispose(dropDownMenuFullList);
                 Utility.Dispose(listBackgroundImage);
             }
@@ -594,13 +594,13 @@ namespace Tizen.NUI.Components
                 Focusable = true,
             };
 
-            scrollable = new Scrollable()
+            scrollableBase = new ScrollableBase()
             {
                 Name = "Scrollable",
             };
-            scrollable.Add(dropDownMenuFullList);
+            scrollableBase.Add(dropDownMenuFullList);
 
-            listBackgroundImage.Add(scrollable);
+            listBackgroundImage.Add(scrollableBase);
             listBackgroundImage.Hide();
         }