code for HDrawablePool's autoParent