[NUI] Fix Pagination bug
authorJiyun Yang <ji.yang@samsung.com>
Tue, 21 Feb 2023 01:02:05 +0000 (10:02 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Tue, 21 Feb 2023 01:45:29 +0000 (10:45 +0900)
* Bug: When user changes indicator image url, all indicators turn into unselected look.

Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI.Components/Controls/Pagination.cs

index 2618c5c..569dc15 100755 (executable)
@@ -718,13 +718,13 @@ namespace Tizen.NUI.Components
             for (int i = 0; i < indicatorList.Count; i++)
             {
                 ImageView indicator = indicatorList[i];
-                indicator.ResourceUrl = indicatorImageUrl?.Normal;
+                indicator.ResourceUrl = selectedIndex == i ? indicatorImageUrl.Selected : indicatorImageUrl.Normal;
                 indicator.Size = indicatorSize;
             }
 
             if (lastIndicatorImageUrl != null && indicatorCount > 0)
             {
-                indicatorList[LastIndicatorIndex].ResourceUrl = lastIndicatorImageUrl.Normal;
+                indicatorList[LastIndicatorIndex].ResourceUrl = IsLastSelected ? lastIndicatorImageUrl.Selected : lastIndicatorImageUrl.Normal;
             }
         }