public static void hideView(View parentView, int id) {
        if (parentView != null) {
          View view = parentView.findViewById(id);
          if (view != null) {
              view.setVisibility(View.GONE);
          } else {
              Log.e("Caffeine", "View does not exist.  Could not hide it.");
          }
        }
    }
public static void hideView ( View parentView , int id ) { if ( parentView != null ) { View view = parentView . findViewById ( id ) ; if ( view != null ) { view . setVisibility ( View . GONE ) ; } else { Log . e ( "Caffeine" , "View does not exist.  Could not hide it." ) ; } } }
Sets visibility of the given view to <code>View.GONE</code>.

@param parentView The View used to call findViewId() on.
@param id         R.id.xxxx value for the view to hide "expected textView to throw a ClassCastException" + textView.