Added LoadingStatus property in ImageView. 30/158730/2
authorUmar <m.umar@partner.samsung.com>
Thu, 2 Nov 2017 17:16:32 +0000 (17:16 +0000)
committerUmar <m.umar@partner.samsung.com>
Thu, 2 Nov 2017 17:21:21 +0000 (17:21 +0000)
The purpose was to check whether Image loading was successful or not.

Change-Id: Ibd74d806bc93b3d254208fb96ab8c5427582c0d2

Tizen.NUI/src/internal/ManualPINVOKE.cs
Tizen.NUI/src/public/BaseComponents/ImageView.cs

index 1f66fb9..8900502 100755 (executable)
@@ -181,6 +181,9 @@ namespace Tizen.NUI
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_ViewWrapperImpl_CreateTransition")]
         public static extern global::System.IntPtr ViewWrapperImpl_CreateTransition(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_View_GetVisualResourceStatus")]
+        public static extern int View_GetVisualResourceStatus(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_View_CreateTransition")]
         public static extern global::System.IntPtr View_CreateTransition(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
index 5182c4f..a804d11 100755 (executable)
@@ -355,6 +355,21 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        public ImageView.LoadingStatusType LoadingStatus
+        {
+            get
+            {
+                return (ImageView.LoadingStatusType)NDalicManualPINVOKE.View_GetVisualResourceStatus(swigCPtr, (int)Property.IMAGE);
+            }
+        }
+
+        public enum LoadingStatusType
+        {
+            Preparing,
+            Ready,
+            Failed
+        }
+
         private void UpdateImage()
         {
             if (_url != null)