java - Expandable ListView change childdata on buttonClick -
okay, english not best, give try :)
i have 3 buttons, each 1 implements onclicklistener
. have expandablelistview
, filled data. if 1 button clicked, call method changes child data , show new data changed method. problem data remains same , there no changes. tried call method notifydatasetchanged
in onclick
method not work.
[...] explistview.setadapter(listadapter); dienstag.setonclicklistener(new button.onclicklistener() { @override public void onclick(view v) { arraydienstaginitialsierung(); listadapter.notifydatasetchanged(); } }); } expandablelistadapter listadapter; listadapter = new expandablelistadapter(this, listdataheader, listdatachild); // setting list adapter explistview.setadapter(listadapter); private void arraydienstaginitialsierung() { system.out.println("hallo bin im dienstag drinnen"); //früchstück (int f = 0;f < zwischentabelleliste.size();f++) { if(zwischentabelleliste.get(f).getmahlzeit().equals("fruechstueck") && zwischentabelleliste.get(f).gettag() == 2) //kommt noch dazu welcher ernährungsplan geplant ist { produktelistefruechstueckstring.add(produkteliste.get(fr).tostring()); } }
Comments
Post a Comment