java - Android, trying to add a graph -


i'm using ioio board android (nexus simulator) , have basic ioio connection going. can sample 2 analogue pins.

the next step try graph results. in dependencies i've got

compile 'com.jjoe64:graphview:4.1.0' 

in mainactivity, oncreate have (commented out)

 graph1 = (graphview) findviewbyid(r.id.graph1); 

in looper have (also commented out)

 linegraphseries<datapoint> series = new linegraphseries<>(new datapoint[] {    new datapoint(0,3), new datapoint(1,3), new datapoint(2,6) }); 

in activity_main.xml have (commented out)

   <com.jjoe64.graphview.graphview     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/graph1"     android:layout_below="@+id/output1"     android:layout_alignparentleft="true"     android:layout_alignparentstart="true"/> --> 

when run message hardware acceleration must used, have in main.androidmanifest.xml

<application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsrtl="true" android:hardwareaccelerated="true" android:theme="@style/apptheme"> 

since commented out, program still runs in basic mode. remove commenting in activity_main.xml, program crashes. don't know if because hardware acceleration isn't on, or else wrong? comments appreciated.

having heard no hints, tried compiled graphview application. had worked.

i had guess perhaps might in dependencies. dependencies are

dependencies {   compile filetree(dir: 'libs', include: ['*.jar'])   testcompile 'junit:junit:4.12'   compile 'com.android.support:appcompat-v7:23.1.1'   compile files('libs/graphview-4.0.1.jar') //    compile 'com.jjoe64:graphview:4.1.0' } 

i added compile 'com.jjoe64:graphview:4.1.0', have in program. uncommenting line , commenting out line above it, program started fail same hardware acceleration must used message.

just sure changed commenting above, did clean, , tried again. on line. why should make such difference have no idea, moment know how continue project.


Comments