Enable NUI register a custom View with namespace.
authorFeng Jin <feng16.jin@samsung.com>
Mon, 10 Jul 2017 08:51:45 +0000 (16:51 +0800)
committerFeng Jin <feng16.jin@samsung.com>
Mon, 10 Jul 2017 08:54:42 +0000 (16:54 +0800)
Change-Id: I11dece2c41fd89d5543655337db1cc3c32a23188
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
src/Tizen.NUI/src/public/CustomView/Spin.cs
src/Tizen.NUI/src/public/CustomViewRegistry.cs

index 2f0664d..b262b51 100755 (executable)
@@ -64,7 +64,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Creates an initialized Spin.
         /// </summary>
-        public Spin() : base(typeof(Spin).Name, CustomViewBehaviour.RequiresKeyboardNavigationSupport)
+        public Spin() : base(typeof(Spin).FullName, CustomViewBehaviour.RequiresKeyboardNavigationSupport)
         {
         }
 
index df8a32b..e20f0f5 100755 (executable)
@@ -271,10 +271,10 @@ namespace Tizen.NUI
         public void Register(Func<CustomView> createFunction, System.Type viewType)
         {
             // add the mapping between the view name and it's create function
-            _constructorMap.Add(viewType.Name, createFunction);
+            _constructorMap.Add(viewType.ToString(), createFunction);
 
             // Call into DALi C++ to register the control with the type registry
-            TypeRegistration.RegisterControl(viewType.Name, _createCallback);
+            TypeRegistration.RegisterControl(viewType.ToString(), _createCallback);
 
             // Cycle through each property in the class
             foreach (System.Reflection.PropertyInfo propertyInfo in viewType.GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public))
@@ -299,14 +299,14 @@ namespace Tizen.NUI
                             ScriptableProperty scriptableProp = attr as ScriptableProperty;
 
                             // we get the start property index, based on the type and it's heirachy, e.g. DateView (70,000)-> Spin (60,000) -> View (50,000)
-                            int propertyIndex = _propertyRangeManager.GetPropertyIndex(viewType.Name, viewType, scriptableProp.type);
+                            int propertyIndex = _propertyRangeManager.GetPropertyIndex(viewType.ToString(), viewType, scriptableProp.type);
 
                             // get the enum for the property type... E.g. registering a string property returns Tizen.NUI.PropertyType.String
                             Tizen.NUI.PropertyType propertyType = GetDaliPropertyType(propertyInfo.PropertyType.Name);
 
                             // Example   RegisterProperty("spin","maxValue", 50001, FLOAT, set, get );
                             // Native call to register the property
-                            TypeRegistration.RegisterProperty(viewType.Name, propertyInfo.Name, propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback);
+                            TypeRegistration.RegisterProperty(viewType.ToString(), propertyInfo.Name, propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback);
                         }
                     }
 #if DEBUG_ON