3

Code Demo vẽ biểu đồ Chart trong android dùng AchartEngine

Posted by chazo1994 on 06:41 in

ACHARTENGINE

Đây là code class demo vẽ đồ họa bằng achartengine
trước tiên vào đây để Download thư viện (down file jar)
trong android studio chuyển sang chế độ project copy file jar và paste vào thư mục libs
rồi chuyển về chế độ android
vào app -> build.grade (module) tìm để phần dependency{ .. } thêm dòng này vào
compile files('libs/achartengine120.jar')
 "achartengine120" sửa thành tên file jar của bạn

sau đó ấn build vậy là dùng đc thư viện achartengine rùi!!!

sau đây là class mình viết demo và có giải thích vài phần trong đó


 package com.example.thinh.designfilter.Util;  
 import android.graphics.Color;  
 import android.graphics.Paint;  
 import android.widget.LinearLayout;  
 import com.example.thinh.designfilter.DrawFilterActivity;  
 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;  
 /**  
  * Created by thinh on 11/22/2015.  
  * class manage drawable Chart on Activity  
  */  
 public class DrawSignal {  
   private GraphicalView myChart;  
   private XYSeriesRenderer signalRenderer;  
   private XYSeries signalSeries;  
   private XYMultipleSeriesRenderer mySeriesRender;  
   private XYMultipleSeriesDataset mySeriesDataset;  
   private LinearLayout llChart;  // draw chart on listview of activity
   private DrawFilterActivity drawFilterActivity;  
   public DrawSignal(DrawFilterActivity drawFilterActivity, LinearLayout llChart ){  
     this.llChart = llChart;  
     this.drawFilterActivity = drawFilterActivity;  
   }  
   /*  
   * initialize all configuration to Chart  
   * */  
   public void initChart(){  
     signalRenderer = new XYSeriesRenderer();  
     mySeriesRender = new XYMultipleSeriesRenderer();  
     mySeriesDataset = new XYMultipleSeriesDataset();  
     //creat signal and filter that you want draw  
     signalSeries = new XYSeries("pulse");  
     // set XYSeriesRender to render data on screen   
     signalRenderer.setColor(Color.BLUE);  
     signalRenderer.setDisplayBoundingPoints(true);  
     signalRenderer.setPointStyle(PointStyle.CIRCLE);  
     signalRenderer.setPointStrokeWidth(1);  
     //set Render Control full chart (control: color, axist, background , line ...)  
     mySeriesRender.addSeriesRenderer(signalRenderer);  
     mySeriesRender.setPanEnabled(false, false);  
     mySeriesRender.setYAxisMax(0.5);  
     mySeriesRender.setYAxisMin(0);  
     mySeriesRender.setShowGrid(true);  
     mySeriesRender.setGridColor(Color.BLACK);  
     mySeriesRender.setMarginsColor(Color.argb(0x00, 0xff, 0x00, 0x00)); // transparent margin  
     mySeriesRender.setXLabels(10);  
     mySeriesRender.setYLabels(10);  
     mySeriesRender.setXLabelsColor(Color.BLUE);  
     mySeriesRender.setYLabelsColor(0, Color.BLUE);  
     mySeriesRender.setAxisTitleTextSize(5);  
     mySeriesRender.addXTextLabel(mySeriesRender.getXAxisMax(), "n");  
     mySeriesRender.addYTextLabel(mySeriesRender.getYAxisMax(), "h[n]");  
     mySeriesRender.setPointSize(4);  
     // add data signal and filter to dataset  
     mySeriesDataset.addSeries(signalSeries);  
     /*mySeriesDataset.addSeries(filterSeries);*/  
   }  
   /*  
   * Add data to XYSeries  
   * */  
   public void addData(double[] filters,int M){  
     for(int i = 0; i<M;i++){  
       signalSeries.add(i,filters[i]);  
     }  
   }  
      /*  
      * here is code to draw data in object signalRenderer on screen managed by mySeriesRender  
      */  
   public void DrawChart(double[] filters, int M){  
     initChart();  
     addData(filters,M);  
     GraphicalView gvChart = ChartFactory.getLineChartView(drawFilterActivity, mySeriesDataset, mySeriesRender);  
     //GraphicalView gvChart = ChartFactory.getBarChartView(drawFilterActivity, mySeriesDataset, mySeriesRender, BarChart.Type.DEFAULT);  
     llChart.addView(gvChart);  
   }  
 }  

0

MY COMPANY

Posted by chazo1994 on 09:27 in

TODAY: 18/11/2030
Hello everybody, I'm THINH. TONIGHT I'm staying here to address with you about my company


 The company's name is BKDAC (Bach khoa development application), which no body doesn't know. the company established in 2022. Headquaters locate at 01 on street TRẦN ĐẠI NGHĨA in HÀ NỘI city. the first period , the business is very difficult and we have little funds. currently, our company grown up and is becoming a big company.

 BKDAC are a company about Technology, our product is software,website and some device hardware... the first contract when my company established is make a android application. in this contract we engaged our software(app) have good UI (user interface) and this software must have enough feature,which customer required. We attached a warranty to our product. This warranty include the terms which we promise with customer about product, when your product broken or mistake. Currently we make several software such as Ghis application, BKDAC WEAHTER application, KG game, AILATRIEUPHU, IDK (I don't know =))) ) and website such as monreve.somee.com, chazo1994.blogspot.com... we also provide some device hardware like RAM, HDD, SD, CHIP, SNAPDRAGON, HEADPHONE, QUICK CHARGE, PIN, AMPLIFIER, KEY BOARD, MOUSE...

 FOR future of company,we have prepared a business plan and a strategic marketing for two year. In developing the plan, we analyze the market and we look at market VIET NAM is missing product smartphone made in VIET NAM. Through research consumer, A lot of customers VIET NAM want to buy a smartphone made in VIET NAM but this research quote customer require a high quality product. In addition, software online department are developing a website meeting online and a conference application, this product will provide some USE CASE (chức năng) like arrange room, manage attendee or hold a session online. About strategic marketing, we will focus to Internet and google play store. On internet we will advertise on our website and app on google play, we also pay for google to advertisement on other websites.

C'est tout, Thanks everybody, above I talk about my company and I want my company will become a part of your live for help all of you.

Above text, I talk about a Conference, where I want to become main character. hihi you can help me fix error grammar and writing style... please comment below, Thanks so much!



0

Ứng dụng Ghis

Posted by chazo1994 on 09:05 in

GHIS


PHẦN A: Tổng quan ý tưởng và tình trạng thực hiện

1) Ý tưởng
Tạo một ứng dụng với mục đích chính là giúp đỡ cho các em học sinh có hứng thú hơn với lịch sử
ứng dụng sẽ gồm 3 phần chính sau
  1- game lịch sử: xây dựng giống hình thức game ai là triệu phú với ngân hàng các câu hỏi lịch sử theo dạng trắc nghiệm (kiếm nguồn chắc từ google) có nguồn rồi kiểm duyệt.
  2- tutorial trợ giúp học lịch sử sẽ xây dựng serial các bài học ko theo chuẩn quy tắc nào mà chỉ là tổng hợp những sự kiện lịch sử lớn theo dòng thời gian dọc chiều dài lịch sử việt nam
nội dung mỗi bài gồm hai phần. phần chính là một clip có thể là hoạt hình minh họa về sự kiện đó
phần hai là tóm tắt nội dung bằng văn bản nêu nguyên nhân kết quả ý nghĩa và một đoạn comment mang ý kiến chủ quan theo quan điểm cá nhân của người soạn
 3- nhân vật lịch sử là một list các nhân vật lịch sử nổi tiếng của việt nam có cấu trúc như phần 2 nhưng về phần text có thay đổi và bỏ phần comment
 2) Tình trạng thực hiện
- thiết kế được layout,  thiết kế xong cơ sở dự liệu
- code được các khung giao diện chính với phần 1,2 là 2 fragment của tabs selection và 1 được focus trên main UI, phần 3 được đưa vào một list trong navigation bar drawer.

PHẦN A: Share app demo phần khung

Đang trong quá trình làm nên mới code được phần giao diện khung
đây là file apk để xem tham khảo
apkGhis

Copyright © 2009 Đừng Buông Tay Anh All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.