title: How to add firebase specific data to Spinner in android?
body: <p>I'm new to Firebase. I want to add Firebase specific data to my spinner. I view this content <a href="https://stackoverflow.com/questions/41849638/how-to-add-firebase-data-to-spinner-android">This help content, but I don't get it</a><a href="https://i.stack.imgur.com/GLnq5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GLnq5.png" alt="enter image description here" /></a></p>
  <p>i would like to fetch the username into my spinner.</p>
  <p>My code</p>
  <pre><code>private void showdata()
  {
      spinnerRef.child(&quot;Users&quot;).addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(@NonNull DataSnapshot snapshot) {
              for(DataSnapshot item:snapshot.getChildren())
              {
                  spinnerList.add((item.child(&quot;username&quot;).getValue()).toString());
              }
              adapter.notifyDataSetChanged();
          }
  
          @Override
          public void onCancelled(@NonNull DatabaseError databaseError) {
  
          }
      });
  }
  </code></pre>