void setCellLayoutPressedOrFocusedIcon() { if (getParent() instanceof ShortcutAndWidgetContainer) { ShortcutAndWidgetContainer parent = (ShortcutAndWidgetContainer) getParent(); if (parent != null) { CellLayout layout = (CellLayout) parent.getParent(); layout.setPressedOrFocusedIcon((mPressedOrFocusedBackground != null) ? this : null); } } }
void setCellLayoutPressedOrFocusedIcon() { final View shortcutView = (View) getParent(); if (shortcutView != null) { final View cellLayoutChildren = (View) shortcutView.getParent(); if (cellLayoutChildren != null && cellLayoutChildren instanceof CellLayoutChildren) { CellLayout layout = (CellLayout) cellLayoutChildren.getParent(); layout.setPressedOrFocusedIcon((mPressedOrFocusedBackground != null) ? this : null); } } }