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.

snapshot

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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -