'How delete one item in firebase by key

the my code to delete one item in firbase in chiled rcipe the method delete all the list item in rcipe on click one item i think that because for loop the get all item not specfic item and delete all of them i don't konw how can delete just one item in list i went delete the one key just one on click button delete

holder.delete.setOnClickListener(new View.OnClickListener() {        
@Override            
public void onClick(View view) {               
AlertDialog.Builder builder1 = new AlertDialog.Builder(view.getRootView().getContext());               
builder1.setTitle("Delete post");              
builder1.setMessage("Are you sure that you want delete the post?");              
builder1.setCancelable(true);             
builder1.setPositiveButton(  "Yes",new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) {                          
ref.child("recipe").addListenerForSingleValueEvent(new ValueEventListener() {                                 
 @Override
public void onDataChange(DataSnapshot dataSnapshot) {
   for(DataSnapshot uniqueKeySnapshot : dataSnapshot.getChildren()){                                
    String skey = uniqueKeySnapshot.getKey();                                   
  ref.child("recipe").child(skey).setValue(null);
//by this delete all item in list rcipe refrence                                          //uniqueKeySnapshot.child(String.valueOf(id)).child(skey).getRef().removeValue();
//the not delete any thing                                     
 dialog.cancel();                     
  } }                                  
 @Override                               
  public void onCancelled(DatabaseError databaseError) {                             
     Toast.makeText(mContext, "error !"+databaseError.getMessage(), Toast.LENGTH_SHORT).show();                        
    } });

They not do anything when clicking the button delete i cant insert image



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source