Thursday, 15 May 2014

java - Cursor SQLite with AndroidPlot -


I want to connect to the SQLite cursor with AndroidPlot but I get an error. This is my code, what will be the error?

  Private XYPlot mySimpleXYPlot; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); SetContentView (R.layout.activity_grafica); // Start XYPlot Reference: mySimpleXYPlot = (XYPlot) Find ViewById (R.id.mySimpleXYPlot); // increment domain and category mySimpleXYPlot.setDomainStep (XYStepMode.INCREMENT_BY_VAL, 0.05); MySimpleXYPlot.setRangeStep (XYStepMode.INCREMENT_BY_VAL, 0.05); // Open Database PlotXY Database Helper admin_PlotXY = New DatabaseHelper (this); SQLiteDatabase bd_PlotXY = admin_PlotXY.getWritableDatabase (); // Cursor SQLite PlotXY cursor data_PlotXY = bd_PlotXY.rawQuery ("select xi, plot_xy to yi", null); If (data_PlotXY.moveToFirst ()) {XYSeries serie_xy = New Simple XYSeries (data_PlotXY, SimpleXYSeries.ArrayFormat.XY_VALS_INTERLEAVED, "Series X = Y"); Line and Point Format SeriesFormat XY = New Line and PointFormer (Color. RGB (127, 255, 0), 0x000000,0x000000, blank); MySimpleXYPlot.clear (); MySimpleXYPlot.addSeries (serie_xy, seriesFormatXY); MySimpleXYPlot.redraw (); } And (Toast. Make Text) (This is, "Error Ann La Base de Ditos Plot _ X", Toast. LNGHHART). Show ();} Datapotal x } ` 

Message:" Constructor can not be solved by SimpleXYSeries (android.databaseCursor, androidplot.xy.SimpleXYSeries.ArrayFormat, Java.lang.String) '

< There is no constructor for / div>

SimpleXySeries that you type the cursor It is the signature of the constructor:

  SimplexWise (list & lt ;; number, model, simplexeries, array format format, string title);  
< P> your code in cursor to list To change or to get any data type that comes from number . cursor to list

< / Html>

No comments:

Post a Comment