Created
August 7, 2016 09:25
-
-
Save vincent-paing/bf81ff09c9f745b28e60a069eacff357 to your computer and use it in GitHub Desktop.
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
private void loadData() { | |
swipeRefreshingLayout.setRefreshing(true); | |
FireBaseDatabaseManager.getHotelReference().addValueEventListener(new ValueEventListener() { | |
@Override public void onDataChange(DataSnapshot dataSnapshot) { | |
GenericTypeIndicator<List<Hotel>> tempIndicator = new GenericTypeIndicator<List<Hotel>>() { | |
}; | |
hotelRecyclerAdapter.setItems(dataSnapshot.getValue(tempIndicator)); | |
swipeRefreshingLayout.setRefreshing(false); | |
} | |
@Override public void onCancelled(DatabaseError databaseError) { | |
L.e(databaseError.getMessage()); | |
swipeRefreshingLayout.setRefreshing(false); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment