How to get Array List Object From Firebase
Sorry if you were working on this all I needed to do was change the directory.
ValueEventListener postListener = new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot snapshot) {
GenericTypeIndicator<ArrayList<Item>> t = new GenericTypeIndicator<ArrayList<Item>>() {};
ArrayList<Item> yourStringArray = snapshot.getValue(t);
Toast.makeText(getContext(),yourStringArray.get(0).getName(),Toast.LENGTH_LONG).show();
}
@Override
public void onCancelled(DatabaseError firebaseError) {
Log.e("The read failed: " ,firebaseError.getMessage());
}
};
mDatabase.child("list/user1").addValueEventListener(postListener);