Android: Unable to update edittext with database values -


i have table 3 columns (name ,avalue,bvalue), creating pie chart values using achartengine , when click particular chart element want display both avalue , bvalue. able avalue using (seriesselection.getvalue())since chart creating value , how bvalue when particular chart element clicked.

below code

mchartview2=chartfactory.getpiechartview(context, categoryseries,renderer);               parent.addview(mchartview2);               renderer.setclickenabled(true);               mchartview2.setonclicklistener(new view.onclicklistener() {                     @override                     public void onclick(view v) {                       seriesselection seriesselection = mchartview2.getcurrentseriesandpoint();                       if (seriesselection == null) {                         toast.maketext(getactivity(), "no chart element selected", toast.length_short)                             .show();                       }else {                            textview productname = (textview) getactivity().findviewbyid(r.id.productname);                           productname.settext(categoryseries.getcategory(0));                           (int = 0; < categoryseries.getitemcount(); i++) {                               renderer.getseriesrendererat(i).sethighlighted(i == seriesselection.getpointindex());                             edittext avalue = (edittext) getactivity().findviewbyid(r.id.actualvalue);                           avalue .settext(""+seriesselection.getvalue());                            edittext bvalue = (edittext) getactivity().findviewbyid(r.id.budgetvalue);                               budgetlval.settext(""+cursor2.getint(2));                            }                           mchartview2.repaint();                           }                          }                       });               cursor1.close();               return chartfactory.getpiechartintent(context, categoryseries, renderer,null);              } 

the seriesselection provides series index , point index well. use these in order other values model.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -