Created
January 20, 2018 00:50
-
-
Save yusufcakal/7958f0ab318b72c0e197a9c6bf9a0d74 to your computer and use it in GitHub Desktop.
Firebase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ValueEventListener postListener = new ValueEventListener() { | |
@Override | |
public void onDataChange(DataSnapshot dataSnapshot) { | |
Iterable<DataSnapshot> snapshot = dataSnapshot.child("book").getChildren(); | |
for (DataSnapshot snapshot1 : snapshot) { | |
Book book = snapshot1.getValue(Book.class); | |
tvData.setText(book.getName()); | |
} | |
//tvData.setText(book.getName()); Textview e datayı bind ettik. | |
} | |
@Override | |
public void onCancelled(DatabaseError databaseError) { | |
} | |
}; | |
mDatabase.addValueEventListener(postListener); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment