I have custom View
which is dynamically added multiple times in same activity.
Each of custom view instance has beside other stuff a
if you need apply setSaveEnabled for all hierarchy:
public static void SaveEnableViewAndChildren(this View view, bool val)
{
if (view == null)
return;
view.SaveEnabled = val;
var viewGroup = view as ViewGroup;
if (viewGroup == null)
return;
for (int i = 0; i < viewGroup.ChildCount; i++)
SaveEnableViewAndChildren(viewGroup.GetChildAt(i), val);
}