android - Can't solve the selected radio button puzzle in recycler view to add the value of all items? Any help will be appreciated -
i have added radio buttons dynamically in recyclerview
. want total price selected radio buttons of recyclerview
. somehow can't understand puzzle. appreciated.
just checked first when u clicked on button clicked or not position if not add price , display total amount. this
clicked.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { if(clicked.ischecked()){ amountwithsecdepo = string.valueof((model.no_of_days*model.charge_per_day)+(model.deposit_amount)+100); setanimation(getresources().getstring(r.string.rs_sysmbol)+" "+string.valueof(amountwithsecdepo)); }else { int temp = (ordermodel.o_duration_days * model.charge_per_day) + 100; setanimation(getresources().getstring(r.string.rs_sysmbol)+" "+string.valueof(temp)); } } });
Comments
Post a Comment