code: public static void hideKeyboard(Activity activity) {
          View view = activity.getWindow().getDecorView();
  
          if (view != null) {
              hideKeyboard(activity, view);
          }
      }
docs: hide keyboard
  
  @param activity Activity