, 나는이 튜토리얼을 따라하는 것을 시도하고있다 :애플리케이션에 그래프를 그리려면 어떻게해야합니까?
http://www.jjoe64.com/2011/07/chart-and-graph-library-for-android.html
내 활동 클래스로 퍼팅 시도를하며 GraphView
관련된 오류의 톤으로 나타 . 당신은 당신이 된 setContentView 메소드를 호출 한 후 활동의 당신의에서 onCreate 방법에 넣어 해야하는
// graph with dynamically genereated horizontal and vertical labels
GraphView graphView = new GraphView(
this // context
, new GraphViewData[] {
new GraphViewData(1, 2.0d)
, new GraphViewData(2, 1.5d)
, new GraphViewData(2.5, 3.0d) // another frequency
, new GraphViewData(3, 2.5d)
, new GraphViewData(4, 1.0d)
, new GraphViewData(5, 3.0d)
} // data
, "GraphViewDemo" // heading
, null // dynamic labels
, null // dynamic labels
);
LinearLayout layout = (LinearLayout) findViewById(R.id.graph1);
layout.addView(graphView);