I have tried looking for the answer but none works but i believe that this code is a problem,debugger says that
Here is the link to my file : TodoListApp
Skipped 1 frames! The application may be doing too much work on its main thread
// working with data
ourdoes = findViewById(R.id.ourdoes);
ourdoes.setLayoutManager(new LinearLayoutManager(this));
list = new ArrayList<MyDoes>();
// get data from firebase
reference = FirebaseDatabase.getInstance().getReference().child("SeaLab13");
reference.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
// set code to retrive data and replace layout
for(DataSnapshot dataSnapshot1: dataSnapshot.getChildren())
{
MyDoes p = dataSnapshot1.getValue(MyDoes.class);
list.add(p);
}
doesAdapter = new DoesAdapter(MainActivity.this, list);
ourdoes.setAdapter(doesAdapter);
doesAdapter.notifyDataSetChanged();
}
@Override
public void onCancelled(DatabaseError databaseError) {
// set code to show an error
Toast.makeText(getApplicationContext(), "No Data", Toast.LENGTH_SHORT).show();
}
});