@Override public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View res = inflater.inflate(getLayoutResId(), container, false); mTxtValue = (TextView) res.findViewById(R.id.txtValue); mGraValues = (GraphView) res.findViewById(R.id.graValues); if (mGraValues != null) { mGraValues.setType(0, GraphView.Type.LINES); mGraValues.setColor(0, 0xFFFF0000); mGraValues.setType(1, GraphView.Type.LINES); mGraValues.setColor(1, 0xFF00FF00); mGraValues.setType(2, GraphView.Type.LINES); mGraValues.setColor(2, 0xFF0000FF); } return res; }
protected void setValues(int index, float[] values) { mGraValues.setValues(index, values); }