title: Firebase data not retrieved in textview
body: <p>New to Android and Firebase, Developed two application in which one will send the data to the firebase database and other will retrieve the data from the database.</p>
  
  <p>Data is successfully added in firebase console but when I am retrieving the data in other application only one node of the data is displayed, but when I am checking through debugging the code all the data is displayed but in textview only a  single node is displayed.</p>
  
  <p>Below is my code for retrieving the code - </p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
      implements NavigationView.OnNavigationItemSelectedListener {
  
  TextView tv,tv1;
  Button btn;
  FirebaseDatabase database = FirebaseDatabase.getInstance();
  DatabaseReference myRef = database.getReference("users");
  private DatabaseReference mDatabase;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      if (!FirebaseApp.getApps(this).isEmpty()) {
          // Not in crash process.  Do your Remote Config init here.
          System.out.println("ss");
      }
  
      tv = (TextView) findViewById(R.id.textView3);
      tv1 = (TextView) findViewById(R.id.textView2);
      mDatabase = FirebaseDatabase.getInstance().getReference();
      btn = (Button) findViewById(R.id.button2);
  
      btn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
  
              ValueEventListener valueEventListener = myRef.addValueEventListener(new ValueEventListener() {
                  @Override
                  public void onDataChange(DataSnapshot snapshot) {
                      for (DataSnapshot postSnapshot : snapshot.getChildren()) {
                          User user = postSnapshot.getValue(User.class);
                          String string = "Name: " + user.getUsername() + "\n Number : " + user.getNumber() + "\n Age: " + user.getAge();
                          tv.setText(string);
  
  
                      }
                  }
  
                  @Override
                  public void onCancelled(DatabaseError databaseError) {
                      System.out.println("The read failed: " + databaseError.getMessage());
                  }
              });
  
  }
  </code></pre>
  
  <p>Now what I want to do is display all the data in different textviews (one user one textview) or can use cardview(still got to study that).</p>
  
  <p>Below is the json of data on firebase console</p>
  
  <pre><code>{
  "users" : {
  "Name1" : {
    "age" : "18",
    "number" : "1234678",
    "username" : "Name1"
  },
  "Name2" : {
    "age" : "20",
    "number" : "99999999",
    "username" : "Name2"
  },
  "Name3" : {
    "age" : "22",
    "number" : "8888888",
    "username" : "Name3"
  }
  }
  }
  </code></pre>
  
  <p>In output on application, I am only getting - </p>
  
  <pre><code>Name: Name3
  Number: 8888888
  Age: 22
  </code></pre>