Este es mi códigovista de lista no se actualiza con notifydatasetchanged() llamar
listview =(ListView) findViewById(R.id.lv1);
ArrayList<SClass> Monday = new ArrayList<SClass>();
SClass s1=new SClass();
s1.sName="samp";
s1.salary=1000;
Monday.add(s1);
temp=Monday;
adapter = new CustomAdap(this, temp);
listview.setAdapter(adapter);
El código anterior funciona fine.But cuando cambio mi código para esta
listview =(ListView) findViewById(R.id.lv1);
adapter = new CustomAdap(this, temp);
SClass s1=new SClass();
s1.sName="samp";
s1.salary=1000;
Monday.add(s1);
temp=Monday;
listview.setAdapter(adapter);
adapter.notifyDataSetChanged();
Listview no muestra anything.what ¿es el problema?
Esto sería más claro si se entregue la fuente de CustomAdap y lunes, así como donde se declaró el lunes. – louielouie
he agregado el código para customadap y el lunes es un Arraylist de SClass –
@TariqIbrahim ¿Puedes ver http://stackoverflow.com/questions/28148618/listview-not-refreshing-after-click-on-button –