Guest User

Untitled

a guest
Dec 15th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public void gerarLotes() {
  2.  
  3. lotes = new ArrayList<>();
  4.  
  5. lotesReferencia.addChildEventListener(new ChildEventListener() {
  6. @Override
  7. public void onChildAdded (@NonNull DataSnapshot dataSnapshot, @Nullable String s){
  8.  
  9. for(DataSnapshot postSnapshot : dataSnapshot.getChildren()){
  10.  
  11. Lotes json = dataSnapshot.getValue(Lotes.class);
  12.  
  13. HMAux aux = new HMAux();
  14. aux.put(HMAux.TEXTO_01, json.getId());
  15. aux.put(HMAux.TEXTO_02, json.getPecas());
  16. aux.put(HMAux.TEXTO_03, json.getPreço());
  17.  
  18. lotes.add(aux);
  19.  
  20. }
  21.  
  22. }
Add Comment
Please, Sign In to add comment