Retrieve data 'live' from spinner within a RecyclerView

Joined
May 20, 2023
Messages
1
Reaction score
0
Hello all,

I am working in Android Studio using Java and I am trying to figure out how to get a 'live' update. I have a RecyclerView that is populating from a data class and there is a spinner/dropdown container within each row of the RecyclerView. Essentially, the user will pick a number from that spinner, and what I want to happen is that number gets multiplied by a number attached to the data of that individual row (the price).

image.png


I think I have the math sorted, but I then want to display the total on the activity screen outside of the RecyclerView, in the TextView by "Total:". Any idea how I can make that happen 'live'?

I've tried adapting the TextView to MaterialTextViews and Editable to use those listeners, but nothing happened (but it didn't crash either).

Thank you in advance for any assistance you can provide!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,703
Messages
2,569,328
Members
44,612
Latest member
Billysak

Latest Threads

Top