Code example for View

Methods: getParentsetFocusableInTouchModesetVisibility

0
    @SuppressWarnings("deprecation") 
    final Window w = getLocalActivityManager().startActivity(ACTIVITY_TAG, intent);
    final View wd = w != null ? w.getDecorView() : null;
 
    if (wd != null) {
      ViewParent parent = wd.getParent();
      if(parent != null) {
        ViewGroup v = (ViewGroup)parent;
        v.removeView(wd);
      } 
 
      wd.setVisibility(View.VISIBLE);
      wd.setFocusableInTouchMode(true);
      if(wd instanceof ViewGroup) {
        ((ViewGroup) wd).setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
      } 
    } 
    return wd;
  } 
} 
Experience pair programming with AI  Get Codota for Java