Code example for MenuInflater

    return LayoutInflater.from(realActivity);
  public MenuInflater getMenuInflater() {
    return new MenuInflater(realActivity);
   * Checks to ensure that the{@code contentView} has been set 
   * @param id ID of the view to find 
   * @return the view 
   * @throws RuntimeException if the {@code contentView} has not been called first 
  public View findViewById(int id) {
    return getWindow().findViewById(id);
Connect your IDE to all the code out there  Get Codota for Java