How Android animates curves

Updated on technology 2024-03-27
8 answers
  1. Anonymous users2024-02-07

    There is a similar article in the Lecheng Mobile Developers Alliance.

  2. Anonymous users2024-02-06

    To draw a curve diagram, you first need to draw the horizontal and vertical coordinate axes to establish the coordinate system, for example, how long the 100 distance in the coordinate system should be drawn in the canvas, this needs to be calculated, in fact, the establishment of the coordinate system is the most complex, I have seen many third-party libraries The establishment methods are different, some are more flexible, and some are more rigid. As for drawing curves, either by method or by method, it depends on your own habits.

    In order to make a good-looking graph, I referred to two open sources**, the first one has more restrictions on drawing the graph, and the scope of use is too narrow, but there is an animation effect when the data changes. The second one has a wide range of applications, he can automatically calculate the number of horizontal and vertical coordinates according to the data set, the distance of cells on the canvas, just enter the coordinate points to automatically establish the coordinate system and draw curves, but there is no animation effect.

    Let's start with the first lineview.

    The demo of lineview can be here**,Lineview is actually just a part of the github project.,I extracted it.,Personally, I don't think the other parts of it have reference value.。 The author seems to be a Korean.

    There is nothing desirable about LineView's curve drawing, what I want to learn is his method of achieving animation effects, which is well designed, but the specific implementation needs to be improved to make the animation smoother.

    LineView:

    Add a LineView control in the XML.

  3. Anonymous users2024-02-05

    mpandroidchart

    Powerful charting tools, support line charts, area charts, scatter charts, time charts, bar charts, pie charts, bubble charts, donut charts, range (high to low) bar charts, network charts and a combination of various charts; Support drag and drop zoom of graphs; Support Android and above, support horizontal and vertical axis zoom, multi-finger zoom, display animation, highlight, save to SDCARD, read charts from files.

    achartengine

    Powerful charting tools that support line charts, area charts, scatter charts, time charts, bar charts, pie charts, bubble charts, donut charts, range (high to low) bar charts, dial charts, cube charts, and a combination of various graphs.

    graphview

    Draw charts and curve charts in view, which can be used to display curved charts, bar charts, and wave charts on Android.

    holographlibrary

    Draw line charts, bar charts, pie charts.

    xcl-charts

    xcl-charts is based on the native canvas to draw various charts, and when designing, try to ensure the development efficiency while providing users with enough customization capabilities. This makes it easy to use and has a fairly flexible customization capability. Currently, 3D non-3D bar charts are supported. Gauge chart), radar chart, circle chart, etc.

    Other features include support for chart zoom, gesture movement, animation display effects, high-density column display, chart demarcation custom lines, hybrid display of multiple charts, and switching between different types of charts from the same data source.

    eazegraph

    Android charting library, support for bar charts, hierarchical bar charts, pie charts, linear charts.

    williamchart

    The chart drawing library supports three chart types: LineChartView, BarChartView, and StackBarchartView, and supports Android and above systems.

    hellocharts for android

    Support line charts, bar charts, pie charts, bubble charts, and combination charts; Support preview, zoom in, scrolling, and some charts support animation; Support Android and above.

  4. Anonymous users2024-02-04

    Get the lineview object in activity:

    finallineview lineview = (lineview)findviewbyid(;

    Add abscissa:

    int randomint = 9;

    arraylisttest =newarraylist();

    for (int i=0;idatalist = newarraylist();

    intrandom = (int)(;

    for (int i=0;i>datalists = newarraylist>()

    As can be seen from its usage, lineview needs to set the range of abscissa in advance, and the value of the ordinate must correspond to the value added one-to-one (read the lineview source code to know), it is very inconvenient to use, I think the author just made a curve, and did not pay much attention to whether it was useful. Like many open source graphs, LineView allows you to draw several curves of different colors at once.

    Just add another list member to the datalists in the ** above.

  5. Anonymous users2024-02-03

    I'm using androidchart.,Draw **** pictures or something.,All kinds of charts can be.,I see there's no problem with you.,This project is open source.。

  6. Anonymous users2024-02-02

    Go to the Android Bus There are related cases above.

  7. Anonymous users2024-02-01

    With fusionchartsjs, I tested it myself, and there was no problem.

  8. Anonymous users2024-01-31

    There is an open-source library chartview, which is available after searching on the Internet.

Related questions
24 answers2024-03-27

The operating system of Android mobile phones is similar, taking Huawei mobile phones as an example, you can try the following screenshot methods: >>>More

9 answers2024-03-27

Basic steps: get bluetoothadapter blueadapter=;

If the Bluetooth adapter is null, the Android phone does not have a Bluetooth module. >>>More

5 answers2024-03-27

The introduction of SVG also needs to start with the digitalization of the first class. In general, there are two scenarios for storing ** as data. That. >>>More

11 answers2024-03-27

(0, 3), =3cos is outside.

3, 2), =1+cos The outer two curves are symmetrical with respect to the polar axis, so that only half of the upper polar axis is required to s=2 (0, 3)1+cos d +2 ( 3, 2)3cos d >>>More

28 answers2024-03-27

Two lands, one of which must be a land that yields red mana cost.