N
N
Nikita Kotov2018-08-27 09:44:33
Java
Nikita Kotov, 2018-08-27 09:44:33

How to remove selected item in Android studio(Ps app is mine)?

I'll describe the essence of the whole problem: I'm just starting to develop for Android and wrote a couple of such small applications, in the style of "press the button and a message will appear." But I decided to write an application for a small business in order to gain experience and feel the whole essence of mobile development! What is the essence of the application: the seller enters the name of the "product" (I will call it that) and its price ... then a field appears with the name and price. ..if the seller entered it incorrectly, he will want to delete this "product"! By clicking on this product, a warning "pops up", they say he definitely decided to delete it?! This is where the problem arose, I can't delete it, but it seems to me everything because my "goods" get into the FireBase database... on the screenshots, I laid out everything in detail, and the application was made almost the same as in the video tutorial on YouTube.
And tell me how easy it is to understand development for Android? Where can I get knowledge if there are no courses in your city, but online confuses me (or is it still worth the money?)? I will be grateful for the answer! Because I have been struggling with this for a month problem and can't find an answer on the forums
5b8396a368c60347799198.png5b8396b2d23a6049124783.png5b8396c2b09bf984240413.png5b839b06e3ed2880800331.png5b839b19c2568760339226.png5b839b2590290510262409.png5b839b2f5a56c544938136.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2018-08-27
Hasanly @azerphoenix

Hello!
I myself am currently learning Android development. I started studying with video courses...
Link 1 - https://startandroid.ru/ru/
Link 2 - https://devcolibri.com/
Well, then I look at foreign online courses on the desired topic... It's
quite inconvenient to look at the code in the screenshot and it is desirable that you provide only the "problematic" code, not a screenshot of the project. As for deleting information, what exactly is the problem of sending a query to the database to delete the created record and update the view of the component? You currently have nothing in your delete() method for the "delete" action.
Since you are using Firebase, maybe it makes sense to use the firebase recyclerview adapter? Well, accordingly, after deleting, we update by adding to the adapter - notifyDataSetChanged.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question