title: I need Quick refresh data from firebase database when the data is add
body: <p>I just want to refresh the data as I enter the new data but my code is not working right it shows the data after reopen the same activity.</p>
  <p><strong>Here is my code:</strong></p>
  <pre><code>Total_bgt_dataref.addListenerForSingleValueEvent(new ValueEventListener(){
      @Override
      public void onDataChange(@NonNull DataSnapshot snapshot){
          for(DataSnapshot ds:snapshot.getChildren()){
              Map&lt;String, Object&gt; objectMap=(HashMap&lt;String, Object&gt;)snapshot.getValue();
              String value=(String)objectMap.get(&quot;Total_Budget&quot;);
              tv_budget.setText(value);
          }
      }
      @Override
      public void onCancelled(@NonNull DatabaseError error){
          Toast.makeText(MainActivity.this,&quot;DatabaseError Total Budget&quot;,Toast.LENGTH_SHORT).show();
      }
  });
  </code></pre>