title: Long Press doesn't work with OnLongClickListener
body: <p>I want to make a long press on an item in the recyclerview and have the two options &quot;Edit Data&quot; and &quot;Delete data&quot; appear.
  I have the code below already written but I don't understand how it works.</p>
  <p>The error appears in <code>View.OnLongClickListener()</code></p>
  <p>Error: <code>Class 'Anonymous class derived from OnLongClickListener' must either be declared abstract or implement abstract method 'onLongClick(View)' in 'OnLongClickListener</code></p>
  <pre><code>recyclerView.setOnLongClickListener(new View.OnLongClickListener() {
                  @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());
                  ProgressDialog progressDialog = new ProgressDialog(view.getContext());
  
                  CharSequence[] dialogItem = {&quot;Edit Data&quot;,&quot;Delete Data&quot;};
                  builder.setTitle(sensorModels.get(position).getNome());
                  builder.setItems(dialogItem, new DialogInterface.OnClickListener() {
                      @Override
                      public void onClick(DialogInterface dialog, int i) {
  
                          switch (i){
                              
                              case 0:
                                  startActivity(new Intent(getApplicationContext(),CreateSensorActivity.class)
                                          .putExtra(&quot;position&quot;,position));
  
                                  break;
  
                              case 1:
  
                                  deleteData(sensorModels.get(position).getId());
  
                                  break;
  
                          }
  
                      }
                  });
              }
          });
  </code></pre>