eclispe画安卓客户端的曲线

用eclispe编的安卓客户端怎么接受sql里的数据并绘制成曲线

根据绘图区域,把接收到的数据根据数据源中最大值最小值折算成坐标,在canvas绘制就是了
下面是计算坐标和value的代码

//根据数据计算对应的Y坐标
//rect:绘图区域;yValue:数据值;max:要绘制的数据集中的最大值;min:要绘制的数据集中的最小值
     public static float getYCoordinate(Rect rect,float yValue,float max,float min)
    {
        float x = 0;
        float h = rect.height();
        x = rect.top+h*(max - yValue)/(max - min);
        return x;
    }
        //计算指定Y坐标处代表的数值
    public static float getYValue(Rect rect,float y,float max,float min)
    {
        float x = 0;
        float h = rect.height();
        x = max-(max-min)*(y-rect.top)/h;
        return x;
    }

用eclispe编的安卓客户端怎么接受sql里的数据并绘制成曲线

1.接收sql,可以在服务端执行,然后通过webservice或者消息传给客户端

2.客户端接收到数据后,进行绘制曲线,可参考http://blog.csdn.net/rhljiayou/article/details/7212620