可以绘制线性图,点状图,柱状图,饼状图,气泡图等

1. [文件] ABarChart.java ~ 2KB     下载(231)

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package com.anjoyo.achartengine;
 
import java.util.Random;
 
import org.achartengine.ChartFactory;
import org.achartengine.chart.BarChart.Type;
import org.achartengine.model.CategorySeries;
import org.achartengine.model.XYMultipleSeriesDataset;
import org.achartengine.renderer.SimpleSeriesRenderer;
import org.achartengine.renderer.XYMultipleSeriesRenderer;
 
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
 
public class ABarChart {
    public Intent execute(Context context) {
         
        return ChartFactory.getBarChartIntent(context, getBarChartDataset(), getBarChartRenderer(), Type.DEFAULT);
    }
 
    private XYMultipleSeriesRenderer getBarChartRenderer() {
        // TODO Auto-generated method stub
        XYMultipleSeriesRenderer renderer=new XYMultipleSeriesRenderer();
        SimpleSeriesRenderer r;
        r=new SimpleSeriesRenderer();
        r.setColor(Color.BLUE);
        renderer.addSeriesRenderer(r);
        r=new SimpleSeriesRenderer();
        r.setColor(Color.GREEN);
        renderer.addSeriesRenderer(r);
        setBarChartRenderer(renderer);
        return renderer;
    }
 
    private void setBarChartRenderer(XYMultipleSeriesRenderer renderer) {
        // TODO Auto-generated method stub
        renderer.setChartTitle("Bar Chart");
        renderer.setXTitle("X Axis");
        renderer.setYTitle("Y Axis");
        renderer.setXAxisMax(10.5);
        renderer.setXAxisMin(0.5);
        renderer.setYAxisMax(210);
        renderer.setYAxisMin(0);
    }
 
    private XYMultipleSeriesDataset getBarChartDataset() {
        // TODO Auto-generated method stub
        XYMultipleSeriesDataset dataset=new XYMultipleSeriesDataset();
        final int SERIES_NR=2;
        final int NR=10;
        Random random=new Random();
        for (int i = 0; i < SERIES_NR; i++) {
            CategorySeries series=new CategorySeries("Bar Chart---"+(i+1));
            for (int j = 0; j < NR; j++) {
                series.add(100+random.nextInt(100));
            }
            dataset.addSeries(series.toXYSeries());
        }
        return dataset;
    }
}

2. [文件] ABubbleChart.java ~ 3KB     下载(113)

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
package com.anjoyo.achartengine;
 
import java.util.Random;
 
import org.achartengine.ChartFactory;
import org.achartengine.chart.PointStyle;
import org.achartengine.model.XYMultipleSeriesDataset;
import org.achartengine.model.XYValueSeries;
import org.achartengine.renderer.XYMultipleSeriesRenderer;
import org.achartengine.renderer.XYSeriesRenderer;
 
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
 
public class ABubbleChart {
    private final int SERIES_NR = 3;
    private final int NR = 20;
 
    public Intent execute(Context context) {
        return ChartFactory.getBubbleChartIntent(context,
                getBubbleChartDataset(), getBubbleChartRenderer(),
                "Bubble Chart Demo");
    }
 
    private XYMultipleSeriesRenderer getBubbleChartRenderer() {
        // TODO Auto-generated method stub
        XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
        int[] linearColor = { Color.RED, Color.GREEN, Color.BLUE };
        XYSeriesRenderer r;
        for (int i = 0; i < SERIES_NR; i++) {
            // entry=new XYEntry<Integer, Integer>(key, value);
            r = new XYSeriesRenderer();
            r.setColor(linearColor[i]);
            r.setPointStyle(PointStyle.POINT);
            r.setLineWidth(2);
            renderer.addSeriesRenderer(r);
        }
        setBarChartRenderer(renderer);
        return renderer;
    }
 
    private XYMultipleSeriesDataset getBubbleChartDataset() {
        // TODO Auto-generated method stub
        XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
        for (int i = 0; i < SERIES_NR; i++) {
            XYValueSeries series = new XYValueSeries("Bubble Chart---"
                    + (i + 1));
            int temp = 10 * i;
            int[][] data = getBasicData();
            for (int j = 0; j < data.length; j++) {
                if((j+1)%5 ==0){
                    int x = data[j][0];
                    int y = temp;
                    int value=data[j][1]+temp;
                    series.add(x, y, value);
                }
            }
            dataset.addSeries(series);
        }
        return dataset;
    }
 
    private int[][] getBasicData() {
        int[][] data = new int[20][2];
        Random rand = new Random();
        for (int i = 0; i < data.length; i++) {
            data[i][0] = i;
            data[i][1] = 20 + rand.nextInt(20) % 20;
        }
        return data;
    }
 
    private void setBarChartRenderer(XYMultipleSeriesRenderer renderer) {
        // TODO Auto-generated method stub
        renderer.setChartTitle("Bubble Chart");
        renderer.setXTitle("X Axis");
        renderer.setYTitle("Y Axis");
        renderer.setXAxisMax(20);
        renderer.setXAxisMin(0);
        renderer.setYAxisMax(30);
        renderer.setYAxisMin(0);
        renderer.setAntialiasing(true);//没有看出有啥效果来
        renderer.setApplyBackgroundColor(true);//设置背景颜色
        renderer.setBackgroundColor(Color.TRANSPARENT);
        renderer.setShowAxes(true);//
        renderer.setAxesColor(Color.GRAY);
        renderer.setClickEnabled(true);//设置了之后,不可再拖动
        renderer.setZoomButtonsVisible(true);//设置伸缩按钮是否可见
        renderer.setZoomEnabled(true);
        renderer.setExternalZoomEnabled(true);//设置是否可以向伸缩
        renderer.setLabelsColor(Color.GREEN);
        renderer.setLabelsTextSize(16);
    }
}

3. [文件] ALinearChart.java ~ 2KB     下载(122)

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.anjoyo.achartengine;
 
import java.util.Random;
 
import org.achartengine.ChartFactory;
import org.achartengine.chart.PointStyle;
import org.achartengine.model.XYMultipleSeriesDataset;
import org.achartengine.model.XYSeries;
import org.achartengine.renderer.XYMultipleSeriesRenderer;
import org.achartengine.renderer.XYSeriesRenderer;
 
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
 
public class ALinearChart {
    private final int SERIES_NR=3;
    private final int NR=20;
    public Intent execute(Context context) {
        return ChartFactory.getLineChartIntent(context, getLinearChartDataset(), getLinearChartRenderer(), "Linear Chart Another");
    }
 
    private XYMultipleSeriesRenderer getLinearChartRenderer() {
        // TODO Auto-generated method stub
        int[] linearColor={Color.RED, Color.GREEN, Color.BLUE};
        int[] belowLinearColor={Color.YELLOW, Color.CYAN, Color.GRAY};
        XYMultipleSeriesRenderer renderer=new XYMultipleSeriesRenderer();
        XYSeriesRenderer tempRender;
        for (int i = 0; i < SERIES_NR; i++) {
            tempRender=new XYSeriesRenderer();
            tempRender.setColor(linearColor[i]);
//          tempRender.setFillBelowLine(true);
//          tempRender.setFillBelowLineColor(belowLinearColor[i]);
            tempRender.setPointStyle(PointStyle.POINT);
            tempRender.setLineWidth(2);
            renderer.addSeriesRenderer(tempRender);
        }
        setLinearChartRenderer(renderer);
        return renderer;
    }
 
    private void setLinearChartRenderer(XYMultipleSeriesRenderer renderer) {
        // TODO Auto-generated method stub
        renderer.setChartTitle("Three Linear Chart");
        renderer.setXAxisMax(20);
        renderer.setXAxisMin(0);
        renderer.setYAxisMax(60);
        renderer.setYAxisMin(0);
    }
 
    private XYMultipleSeriesDataset getLinearChartDataset() {
        // TODO Auto-generated method stub
        XYMultipleSeriesDataset dataset=new XYMultipleSeriesDataset();
        for (int i = 0; i < SERIES_NR; i++) {
            XYSeries series=new XYSeries("Stock Trend---"+(i+1));
            int temp=10*i;
            int[][] data=getBasicData();
            for (int j = 0; j < data.length; j++) {
                int x=data[j][0];
                int y=temp+data[j][1];
                series.add(x, y);
            }
            dataset.addSeries(series);
        }
        return dataset;
    }
    private int[][] getBasicData() {
        int[][] data=new int[20][2];
        Random rand=new Random();
        for (int i = 0; i < data.length; i++) {
            data[i][0]=i;
            data[i][1]=20+rand.nextInt(20)%20;
        }
        return data;
    }
}

4. [文件] APieChart.java ~ 2KB     下载(116)

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.anjoyo.achartengine;
 
import org.achartengine.ChartFactory;
import org.achartengine.model.CategorySeries;
import org.achartengine.renderer.DefaultRenderer;
import org.achartengine.renderer.SimpleSeriesRenderer;
 
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
 
public class APieChart {
    private double[] values = { 25, 30, 45 };
 
    public APieChart() {
        // TODO Auto-generated constructor stub
    }
 
    public APieChart(double[] values) {
        if (values.length == 3) {
            for (int i = 0; i < values.length; i++) {
                this.values[i] = values[i];
            }
        }
    }
    public Intent execute(Context context) {
        int[] colors={Color.BLUE, Color.GREEN, Color.YELLOW};
        DefaultRenderer renderer=buildCategoryRenderer(colors);
        renderer.setAntialiasing(true);//没有看出有啥效果来
        renderer.setApplyBackgroundColor(true);//设置背景颜色
        renderer.setBackgroundColor(Color.TRANSPARENT);
        renderer.setShowAxes(true);//
        renderer.setAxesColor(Color.GRAY);
        renderer.setClickEnabled(true);//设置了之后,不可再拖动
        renderer.setZoomButtonsVisible(true);//设置伸缩按钮是否可见
        renderer.setZoomEnabled(true);
        renderer.setExternalZoomEnabled(true);//设置是否可以向伸缩
        renderer.setLabelsColor(Color.GREEN);
        renderer.setLabelsTextSize(16);
//      renderer.setLegendHeight(50);
//      renderer.setPanEnabled(true);
        renderer.setStartAngle(180);//好像不好用啊
        CategorySeries series=new CategorySeries("Fruit Ratio");
        series.add("Apple", values[0]);
        series.add("Banana", values[1]);
        series.add("Orange", values[2]);
        return ChartFactory.getPieChartIntent(context, series, renderer, "水果");
    }
     
    private DefaultRenderer buildCategoryRenderer(int[] colors) {
        DefaultRenderer renderer=new DefaultRenderer();
        renderer.setApplyBackgroundColor(true);
        renderer.setBackgroundColor(Color.GRAY);
        renderer.setLabelsTextSize(20);
        renderer.setChartTitle("饼状图");
        renderer.setChartTitleTextSize(20);
        renderer.setLegendTextSize(20);
        renderer.setLegendHeight(50);
        for (int i = 0; i < colors.length; i++) {
            int j = colors[i];
            SimpleSeriesRenderer r=new SimpleSeriesRenderer();
            r.setColor(j);
            renderer.addSeriesRenderer(r);
        }
        return renderer;
    }
}

5. [文件] MainActivity.java ~ 3KB     下载(120)

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package com.anjoyo.achartengine;
 
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
 
public class MainActivity extends Activity {
    private Button lineChartBtn;
    private Button areaChartBtn;
    private Button scatterChartBtn;
    private Button timeChartBtn;
    private Button barChartBtn;
    private Button pieChartBtn;
    private Button bubbleChartBtn;
    private Button doughnutChartBtn;
    private Button rangeBarChartBtn;
    private Button dialChartBtn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        lineChartBtn=(Button) findViewById(R.id.line_chart);
        areaChartBtn=(Button) findViewById(R.id.area_chart);
        scatterChartBtn=(Button) findViewById(R.id.scatter_chart);
        timeChartBtn=(Button) findViewById(R.id.time_chart);
        barChartBtn=(Button) findViewById(R.id.bar_chart);
        pieChartBtn=(Button) findViewById(R.id.pie_chart);
        bubbleChartBtn=(Button) findViewById(R.id.bubble_chart);
        doughnutChartBtn=(Button) findViewById(R.id.doughnut_chart);
        rangeBarChartBtn=(Button) findViewById(R.id.range_bar_chart);
        dialChartBtn=(Button) findViewById(R.id.dial_chart);
        OnClickListener listener=new AChartEngineListener();
        lineChartBtn.setOnClickListener(listener);
        pieChartBtn.setOnClickListener(listener);
        barChartBtn.setOnClickListener(listener);
        bubbleChartBtn.setOnClickListener(listener);
    }
    class AChartEngineListener implements OnClickListener{
 
        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            switch (v.getId()) {
            case R.id.line_chart:
//              Intent intent=new Intent(MainActivity.this, LinearChartActivity.class);
//              startActivity(intent);
                Intent linearChartIntent=new ALinearChart().execute(MainActivity.this);
                startActivity(linearChartIntent);
                break;
            case R.id.area_chart:
                break;
            case R.id.scatter_chart:
                 
                break;
            case R.id.time_chart:
                 
                break;
            case R.id.bar_chart:
                Intent barChartIntent=new ABarChart().execute(MainActivity.this);
                startActivity(barChartIntent);
                break;
            case R.id.pie_chart:
                Intent pieChartIntent=new APieChart().execute(MainActivity.this);
                startActivity(pieChartIntent);
                break;
            case R.id.bubble_chart:
                Intent bubbleChartIntent=new ABubbleChart().execute(MainActivity.this);
                startActivity(bubbleChartIntent);
                break;
            case R.id.doughnut_chart:
                 
                break;
            case R.id.range_bar_chart:
                break;
            case R.id.dial_chart:
                 
                break;
 
            default:
                break;
            }
        }
         
    }
}

6. [文件] LinearChartActivity.java ~ 4KB悦德财富:https://www.yuedecaifu.com

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.anjoyo.achartengine;
 
import java.util.Random;
 
import org.achartengine.ChartFactory;
import org.achartengine.GraphicalView;
import org.achartengine.chart.PointStyle;
import org.achartengine.model.XYMultipleSeriesDataset;
import org.achartengine.model.XYSeries;
import org.achartengine.renderer.XYMultipleSeriesRenderer;
import org.achartengine.renderer.XYSeriesRenderer;
 
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
 
public class LinearChartActivity extends Activity {
    private XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
    private XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
    private XYSeries currentSeries;
    private XYSeriesRenderer currentRenderer;
    private String dateFormat;
    private GraphicalView chartView;
 
    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onRestoreInstanceState(savedInstanceState);
        dataset = (XYMultipleSeriesDataset) savedInstanceState
                .getSerializable("dataset");
        renderer = (XYMultipleSeriesRenderer) savedInstanceState
                .getSerializable("renderer");
        currentSeries = (XYSeries) savedInstanceState
                .getSerializable("current_series");
        currentRenderer = (XYSeriesRenderer) savedInstanceState
                .getSerializable("current_renderer");
        dateFormat = savedInstanceState.getString("date_format");
    }
 
    @Override
    protected void onSaveInstanceState(Bundle outState) {
        // TODO Auto-generated method stub
        super.onSaveInstanceState(outState);
        outState.putSerializable("dataset", dataset);
        outState.putSerializable("renderer", renderer);
        outState.putSerializable("current_series", currentSeries);
        outState.putSerializable("current_renderer", currentRenderer);
        outState.putString("date_format", dateFormat);
    }
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.stock_chart);
 
        String seriesTitle = "上证指数";
        XYSeries series = new XYSeries(seriesTitle);
        dataset.addSeries(series);
        currentSeries = series;
        XYSeriesRenderer seriesRenderer = new XYSeriesRenderer();
        seriesRenderer.setColor(Color.BLUE);
        seriesRenderer.setFillBelowLine(true);
//      seriesRenderer.setFillBelowLineColor(Color.RED);//折线下面区域是否添加颜色
        seriesRenderer.setPointStyle(PointStyle.POINT);
        seriesRenderer.setLineWidth(3);
        renderer.addSeriesRenderer(seriesRenderer);
//      添加另外一条曲线图
//      seriesRenderer = new XYSeriesRenderer();
//      seriesRenderer.setColor(Color.GREEN);
//      seriesRenderer.setFillBelowLine(true);
//      seriesRenderer.setFillBelowLineColor(Color.YELLOW);
//      seriesRenderer.setPointStyle(PointStyle.POINT);
//      seriesRenderer.setLineWidth(3);
//      renderer.addSeriesRenderer(seriesRenderer);
         
        renderer.setYAxisMin(0);
        renderer.setYAxisMax(100);
        renderer.setXAxisMax(20);
        renderer.setShowGrid(false);
        renderer.setXLabels(20);
        renderer.setChartTitle("上证指数-24小时趋势图");
 
        currentRenderer = seriesRenderer;
        double x = 0;
        double y = 0;
        int[][] xyValues = getValues();
//      for (int i = 0; i < 2; i++) {
//         
            for (int j = 0; j < xyValues.length; j++) {
                x=xyValues[j][0];
                y=xyValues[j][1];
                currentSeries.add(x, y);
            }
//      }
    }
     
    @Override
    protected void onResume() {
        // TODO Auto-generated method stub
        if(chartView == null){
            LinearLayout layout=(LinearLayout) findViewById(R.id.chart);
            chartView=ChartFactory.getLineChartView(this, dataset, renderer);
            layout.addView(chartView, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
        }else {
            chartView.setBackgroundResource(R.id.chart);
            chartView.repaint();
        }
        super.onResume();
    }
 
    private int[][] getValues() {
        // TODO Auto-generated method stub
        int[][] xyValues = new int[20][2];
        Random rand=new Random();
        for (int i = 0; i < xyValues.length; i++) {
            xyValues[i][0]=i;
            xyValues[i][1]=rand.nextInt(100);
        }
        return xyValues;
    }
}

7. [文件] AndroidManifest.xml ~ 1KB

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.anjoyo.achartengine"
    android:versionCode="1"
    android:versionName="1.0" >
 
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
 
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppBaseTheme"
         >
        <activity
            android:name="com.anjoyo.achartengine.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
         
        <activity android:name=".LinearChartActivity"></activity>
        <activity android:name="org.achartengine.GraphicalActivity"></activity>
    </application>
</manifest>

在android中使用achartengine来绘制各种图表的更多相关文章

  1. 在Android上用AChartEngine轻松绘制图表

    本文由 伯乐在线 - LeonHover 翻译.未经许可,禁止转载!英文出处:jaxenter.欢迎加入翻译组. Android发布不久的2008年底,开发者们已经开始寻找制表.制图.绘图的工具库.当 ...

  2. Android中贝塞尔曲线的绘制方法

    贝塞尔曲线,很多人可能不太了解,什么叫做贝塞尔曲线呢?这里先做一下简单介绍:贝塞尔曲线也可以叫做贝济埃曲线或者贝兹曲线,它由线段与节点组成,节点是可拖动的支点,线段像可伸缩的皮筋.一般的矢量图形软件常 ...

  3. android中Canvas使用drawBitmap绘制图片

    1.主要的绘制图片方法 //Bitmap:图片对象,left:偏移左边的位置,top: 偏移顶部的位置     drawBitmap(Bitmap bitmap, float left, float ...

  4. Android中使用achartengine生成图表

    今天在做项目的时候用到了图表功能,记录下来 achartengine是google的一个开源项目,可以在https://code.google.com/p/achartengine/ 下载技术文档,j ...

  5. Android中的ListView的绘制过程中执行的方法

    首先,系统在绘制ListView之前, 将会先调用getCount方法来获取Item的个数.(如果getCount方法返回0的话,列表时不显示任何内容的) 之后每绘制一个 Item就会调用一次getV ...

  6. 在Android中使用OpenGL ES开发第(五)节:GLSL基础语法

    一.前期基础储备笔者之前的四篇文综述了Android中使用OpenGL ES绘制基本图形和实现了简单的相机预览,初次接触OpenGL ES开发的读者可能对其中新的概念比较迷惑,尤其是其中的顶点着色器( ...

  7. Android中图表AChartEngine学习使用与例子

    很多时候项目中我们需要对一些统计数据进行绘制表格,更多直观查看报表分析结果.基本有以下几种方法: 1:可以进行android  api进行draw这样的话,效率比较低 2:使用开源绘表引擎,这样效率比 ...

  8. Android学习之 AChartEngine 图表绘制

    Android 开源图表绘制工具AChartEngine地址:http://code.google.com/p/achartengine/ AChartEngine Android实现图表绘制和展示( ...

  9. Android中View绘制流程以及invalidate()等相关方法分析

    [原文]http://blog.csdn.net/qinjuning 整个View树的绘图流程是在ViewRoot.java类的performTraversals()函数展开的,该函数做的执行过程可简 ...

随机推荐

  1. 【转载】PHP运行模式的深入理解

    PHP运行模式的深入理解 作者: 字体:[增加 减小] 类型:转载 时间:2013-06-03我要评论 本篇文章是对PHP运行模式进行了详细的分析介绍,需要的朋友参考下   PHP运行模式有4钟:1) ...

  2. PHP与Ajax的交互更新页面

    PHP与Ajax的交互更新页面 本次主要学习ajax的概念以及怎么与PHP之间进行交互操作 1.什么是Ajax?    国内翻译常为“阿贾克斯”和阿贾克斯足球队同音,AJAX 是一种用于创建快速动态网 ...

  3. commonJS — DOM操作(for DOM)

    for DOM github: https://github.com/laixiangran/commonJS/blob/master/src/forDOM.js 代码 /** * Created b ...

  4. perl中->和=>作用

    -> 用法 -> 有两种用法,都和解引用有关. 第一种用法,就是解引用. 根据 -> 后面跟的符号的不同,解不同类型的引用, ->[] 表示解数组引用,->{} 表示解散 ...

  5. node服务器获取form表单

    搭建好服务器后 (前言,本文只是介绍form表单直接提供给 本页面数据,即在不刷新页面的前提下更改数据) 在public里面添加index.html <!DOCTYPE html> < ...

  6. 通过Sql语句导数据

    在通过SQL Server向导中的SQL语句导数据时,默认情况下源表中的nvarchar字段类型会变成202,解决此问题的方法是,要重新选择一下对应的数据接收表.

  7. 补第二周四人小组WBS/NABCD

    四人小组项目<东北师范大学论坛> 要求: 1.给出需求概述.功能列表.痛点或亮点.NABCD及WBS模型在此项目中的应用. 2.不熟悉的名词,自行搜索资料并参考教材第393页开始的术语索引 ...

  8. python中列表的操作

    list1 = ['A' , 'B' , 'C'] list1[0] ; list1[-1] # 取第一个和最后一个元素 list1[ : ] ; list1[ : len(list1)] # 取所有 ...

  9. NOR FLASH与NAND FLASH的区别

    NOR和NAND是现在市场上两种主要的非易失闪存技术.Intel于1988年首先开发出NOR flash技术,彻底改变了原先由EPROM和EEPROM一统天下的局面.紧接着,1989年,东芝公司发表了 ...

  10. Introduction to Windows 8: The Definitive Guide for Developer

    <Windows 8应用开发权威指南>介绍 Introduction to Windows 8: The Definitive Guide for Developer 一.封面设计要求及文 ...