小编use*_*376的帖子

GraphView和resetData

请帮帮我,我使用GraphView库(http://www.jjoe64.com/p/graphview-library.html),它的工作原理.但我不明白如何重置以前的数据.

方法redrawAll()不起作用.

这是我的代码:

   public class MainActivity extends Activity implements OnClickListener{
   private final static int DIALOG_ID=0;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Button btnDialog=(Button)findViewById(R.id.btnDialog);
    btnDialog.setOnClickListener(this);

}


    @Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
}

@Override
public void onClick(View v) {
    // TODO Auto-generated method stub
    switch(v.getId()){
      case R.id.btnDialog:
          createGraph();
    break;

    }

}   

//graph create method       
void createGraph(){ …
Run Code Online (Sandbox Code Playgroud)

android-graphview

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

android-graphview ×1