return ret;
}
+ internal override View FindCurrentChildById(uint id)
+ {
+ return FindChildById(id);
+ }
+
internal void SetParentOrigin(Vector3 origin)
{
Interop.ActorInternal.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
private View ConvertIdToView(uint id)
{
- View view = null;
- if (GetParent() is View)
- {
- View parentView = GetParent() as View;
- view = parentView.FindChildById(id);
- }
+ View view = GetParent()?.FindCurrentChildById(id);
- if (!view)
+ //If we can't find the parent's children, find in the top layer.
+ if (!view)
{
- view = Window.Instance.GetRootLayer().FindChildById(id);
+ Container parent = GetParent();
+ while ((parent is View) && (parent != null))
+ {
+ parent = parent.GetParent();
+ if (parent is Layer)
+ {
+ view = parent.FindCurrentChildById(id);
+ break;
+ }
+ }
}
return view;
return ret;
}
+ internal override View FindCurrentChildById(uint id)
+ {
+ return FindChildById(id);
+ }
+
/// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public View FindChildByName(string viewName)