code: public static void hideView(Activity context, int id) {
          if (context != null) {
              View view = context.findViewById(id);
              if (view != null) {
                  view.setVisibility(View.GONE);
              } else {
                  Log.e("Caffeine", "View does not exist.  Could not hide it.");
              }
          }
      }
docs: Sets visibility of the given view to <code>View.GONE</code>.
  
  @param context The current Context or Activity that this method is called from.
  @param id      R.id.xxxx value for the view to hide"expected textView to throw a ClassCastException" + textView.