code: public View getView(int id, int timeout) {
          View v = null;
          int RETRY_PERIOD = 250;
          int retryNum = timeout / RETRY_PERIOD;
  
          for (int i = 0; i < retryNum; i++) {
              try {
                  v = super.getView(id);
              } catch (Exception e) {}
  
              if (v != null) {
                  break;
              }
              this.sleep(RETRY_PERIOD);
          }
          return v;
      }
docs: Extend the normal robotium getView to retry every 250ms over 10s to get the view requested
  @param id Resource id of the view
  @param timeout amount of time to retry getting the view
  @return View that we want to find by id