Home / Videos / FirebaseUI Firestore RecyclerView Teil 5 – WISCHEN ZUM LÖSCHEN – Android Studio Tutorial

FirebaseUI Firestore RecyclerView Teil 5 – WISCHEN ZUM LÖSCHEN – Android Studio Tutorial

In Teil 5 des FirebaseUI Firestore-Tutorials werden wir den Swipe zum Löschen von Funktionen in die RecyclerView einfügen, indem Sie einen ItemTouchHelper mit einem SimpleCallback erstellen und ihn mit der attachToRecyclerView-Methode an die RecyclerView anhängen. Im onSwiped-Rückruf löschen wir das entsprechende Dokument aus der FirestoreDatabase, indem wir delete in der DocumentReference aufrufen. Wir erhalten diese DocumentReference vom DocumentSnapshot, indem wir getSnapshots (). GetSnapshot (). GetReference () im Adapter aufrufen und die Position an ihn übergeben.
Der FirestoreRecyclerAdapter kümmert sich automatisch um die Aktualisierung seines Datensatzes und zeigt alle entfernten Animationen an.

Sehen Sie sich zuerst das Cloud Firestore-Tutorial an:

Beispielcode, Links & Abhängigkeiten:

❗ Abonniere den Kanal:

⏯ Weitere Tutorials ansehen:

㊙ Hilf beim Übersetzen der Videos:

💚 Unterstütze den Inhalt:

💬 Am Discord-Chat teilnehmen:

🎧 Hörbücher und Podcasts für Programmierer:

👶 So fangen Sie mit der Android-Entwicklung an:

📣 Folgen Sie Coding in Flow in den sozialen Medien:





About AndroidWeltEditor

Check Also

Muss mobile tec haben

Titel: Future Mobile Inventions ,, 2018 ,, 2025 …. Neue mobile Technologien, muss beachtet werden …


  1. can i change it to read data from firebase real-time?

  2. Great tutorial. All your firebase lessons helped me a lot.
    If I can have a question I have a one. What is the best practice to UNDO delete operation?
    I want to display snackbar with information "Item deleted" and button UNDO and just before deleting document from firebase save it to temporary variable and use it if someone press undo button and then add this document again to the collection. Or there is better way to use with firebase? Thanks

  3. The 1 person that disliked this beautiful video is going to hell//

  4. How may i delete subcollection when the document is deleted?

  5. Hi, great tutorial. What to do if I want to place a share button on list item and share this note on whatsapp (Instead of text i am working with images). Basically, I am not able to access the button on list item. Thanks

  6. Hello, amazing tutorials I have learned so much. I have one question, how would I get a couple of icons to be displayed for the onMove function? I want to add the option to edit or delete after swiping. Thank you.

  7. Hello. Thanks again. How I can identify the direction, for example for make different action swipe to the left and swipe to the right?

  8. I can't use this with FirestorePagingAdapter. Is there any way to do this with FirestorePagingAdapter?

  9. You are my man the best content creator for Android development. Your videos are pure gold!

  10. What a cool functionality! You always bring us top content 😊

  11. How would you go about updating info from your firebase from within the app?

  12. Great lesson! Is it possible to make this swipe in a Fragment instead of activity?
    ItemTouchHelper works only in Activity

  13. getSnapshots() doesn't work, please help me. I added all the dependencies.

  14. Hey man, I've been trying to figure this out for a couple of days now but do you know how I can swipe and remove it from the recyclerView without the item being removed from the database?

  15. Can you make a video on how to save data in tabular form in a PDF file , data is retrieved from firebase
    Example to show in pdf::
    id Name Rank
    1 A 50
    2 B 60
    3 C 70

    The above example should be in tabular view with rows column lines

  16. java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1

    I got this error, when I click on the last item of the list after deleting any item above of it.

  17. Can u please make the same tutorial deleting from FirebaseRecyclerAdapter please. Thanks

  18. I have implemented onSwipe using your example and it works perfectly. In your video, you mention that onMove is for drag and drop but I can't get it to work, despite putting in the drag directions. The recycler view doesn't even try to animate the movement of the cards. Do you any videos already on Drag and Drop in a RecyclerView? If not, could you produce one? Thank you again for all the videos you have made so far

  19. Dear sir,
    i want to add Update Functionality can you help a little bit…

  20. how to undo a deleted item?

  21. Hi is there a CMS meant for firestore that can actually handle subcollections?

  22. Sir, you are really brilliant and kind , Thx a lot for your tutorial video, keep it up

  23. Please add, search view and how to open another activity on item click?
    Please sir.

  24. You are good. Please make tutorial on edit and search options using firebase

  25. Hello sir .. is there any way to disable an element in my recyclerView ??

  26. Good job! Superb! I would like to see a video on Firebase image storage mixed with FireStore.

  27. great videos .well done. I hope to see soon a video for how to open new activity if you click on

  28. Plz create stepView
    I want to put a StepView on it
    Thank you so much

  29. Could you show how to open new activity if you click on ?

  30. Hey man, your content is super helpfull! Helped me move from React-Native to android development in under a month. If I could make a suggestion for upcomming series it would be to do one on firebase ML Kit, it works really well but the official documentation is abit lacking imho (atleast if you wanna use custom models).

  31. Hi bro thanks for all your help but just wondering can u add a bell icon with badges like whenever you add new data base in firebase it shows plus one on the bell badges something like Facebook notification

  32. hey!! Please upload a video showing how to use the fingerprint scanner to login to an app!!

  33. Sir can you please make video on installation of Eclipse for Android alongside Android Studio .

  34. I've added an AlertDialog to the onSwiped method so the users get a prompt if they really want to delete the document. When I press cancel in the AlertDialog the document is swiped off the list, but not deleted. I have to restart the activity to see it back in the recyclerview. Is there a way to do this without restarting the activity? Recalling onStart doesn't help.

  35. Your tutorials should be used by google as official ones

Leave a Reply

Your email address will not be published. Required fields are marked *