Skip to content
Advertisement

How to populate a spinner with the result of a Firestore query?

I am creating a spinner which will show the subject name. The subject names are stored in my Firestore database as follows:

JavaScript

I could fetch the result to an RecyclerView but unable to help myself to do so for spinner.

Advertisement

Answer

To solve this, please use the following lines of code:

JavaScript

The result will be a spinner that will contain 2 items:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement