本文实例为大家分享了Android图表库HelloChart绘制多折线图的具体代码,供大家参考,具体内容如下

一、效果图

二、实现步骤

1.添加依赖库

compile 'com.github.lecho:hellocharts-android:v1.5.8'

2.布局文件

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <include
        android:id="@ id/include_id"
        layout="@layout/titlelayout_theme"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="4dp"
            android:orientation="horizontal">

            <View
                android:layout_width="6dp"
                android:layout_height="6dp"
                android:background="#BF0815" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="10sp"
                android:text="噪音"
                android:layout_marginLeft="5dp"
                android:textColor="@color/common_gray3"/>

        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="4dp"
            android:orientation="horizontal">

            <View
                android:layout_width="6dp"
                android:layout_height="6dp"
                android:background="#088B05" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="10sp"
                android:text="温度"
                android:layout_marginLeft="5dp"
                android:textColor="@color/common_gray3"/>

        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="4dp"
            android:orientation="horizontal">

            <View
                android:layout_width="6dp"
                android:layout_height="6dp"
                android:background="#0862D8" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="10sp"
                android:text="pm2.5"
                android:layout_marginLeft="5dp"
                android:textColor="@color/common_gray3"/>

        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="4dp"
            android:orientation="horizontal">

            <View
                android:layout_width="6dp"
                android:layout_height="6dp"
                android:background="#552705" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="10sp"
                android:text="风速"
                android:layout_marginLeft="5dp"
                android:textColor="@color/common_gray3"/>

        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:gravity="center"
            android:padding="4dp"
            android:orientation="horizontal">

            <View
                android:layout_width="6dp"
                android:layout_height="6dp"
                android:background="#6221D1" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="10sp"
                android:text="pm10"
                android:layout_marginLeft="5dp"
                android:textColor="@color/common_gray3"/>

        </LinearLayout>
    </LinearLayout>

    <lecho.lib.hellocharts.view.LineChartView
        android:id="@ id/line_chart"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />


</LinearLayout>

3.Activity类

package com.aldx.hccraftsman.activity;

import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.aldx.hccraftsman.R;
import com.aldx.hccraftsman.application.Application;
import com.aldx.hccraftsman.base.BaseActivity;
import com.aldx.hccraftsman.entity.DustLineChart;
import com.aldx.hccraftsman.entity.DustLineChartModel;
import com.aldx.hccraftsman.entity.TempChartData;
import com.aldx.hccraftsman.jsonparse.JSONObject;
import com.aldx.hccraftsman.jsonparse.ReflectUtil;
import com.aldx.hccraftsman.okHttp.LoadingDialogCallback;
import com.aldx.hccraftsman.utils.Api;
import com.aldx.hccraftsman.utils.Constants;
import com.aldx.hccraftsman.utils.LogUtil;
import com.aldx.hccraftsman.utils.Utils;
import com.lzy.okgo.OkGo;

import java.text.ParseException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cn.qqtheme.framework.picker.DatePicker;
import cn.qqtheme.framework.picker.DateTimePicker;
import lecho.lib.hellocharts.gesture.ZoomType;
import lecho.lib.hellocharts.model.Axis;
import lecho.lib.hellocharts.model.AxisValue;
import lecho.lib.hellocharts.model.Line;
import lecho.lib.hellocharts.model.LineChartData;
import lecho.lib.hellocharts.model.PointValue;
import lecho.lib.hellocharts.model.ValueShape;
import lecho.lib.hellocharts.model.Viewport;
import lecho.lib.hellocharts.view.LineChartView;
import okhttp3.Call;
import okhttp3.Response;

/**
 * author: chenzheng
 * created on: 2017/9/29 10:18
 * description:
 */

public class DustLineChartActivity extends BaseActivity {

    @BindView(R.id.line_chart)
    LineChartView lineChart;
    @BindView(R.id.back_iv)
    ImageView backIv;
    @BindView(R.id.layout_back)
    LinearLayout layoutBack;
    @BindView(R.id.title_tv)
    TextView titleTv;
    @BindView(R.id.right_tv)
    TextView rightTv;
    @BindView(R.id.layout_right)
    LinearLayout layoutRight;

    private String projectId;
    private List<Integer> colors = new ArrayList<>();
    private List<TempChartData> listTemp = new ArrayList<TempChartData>();//数据
    private List<AxisValue> mAxisXValues = new ArrayList<AxisValue>();   //x轴方向的坐标数据
    private List<AxisValue> mAxisYValues = new ArrayList<AxisValue>();            //y轴方向的坐标数据
    private List<Float> distanceList = new ArrayList<Float>();
    private boolean hasAxes = true;       //是否有轴,x和y轴
    private boolean hasAxesNames = true;   //是否有轴的名字
    private boolean hasLines = true;       //是否有线(点和点连接的线,选择false只会出现点)
    private boolean hasPoints = true;       //是否有点(每个值的点)
    private ValueShape shape = ValueShape.CIRCLE;    //点显示的形式,圆形,正方向,菱形
    private boolean isFilled = false;                //是否是填充
    private boolean hasLabels = true;               //每个点是否有名字
    private boolean isCubic = false;                 //是否是立方的,线条是直线还是弧线
    private boolean hasLabelForSelected = false;       //每个点是否可以选择(点击效果)
    private LineChartData data;          // 折线图封装的数据类

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_dust_line_chart);
        projectId = getIntent().getStringExtra("projectId");
        ButterKnife.bind(this);

        initView();
        initData();
        doRequest();
    }

    private void initData() {
        //颜色集合
        colors.add(0xff0862D8);
        colors.add(0xff6221D1);
        colors.add(0xff552705);
        colors.add(0xff088B05);
        colors.add(0xffBF0815);
    }

    private void initView() {
        titleTv.setText("扬尘监测折线图");
        Calendar calendar1 = Calendar.getInstance();
        String sss = Utils.DATE_SIMPLE_FORMATER.format(calendar1.getTime());
        rightTv.setText(sss);
        layoutRight.setVisibility(View.VISIBLE);

    }

    public void doRequest() {
        OkGo.get(Api.GET_MONITOR_MONTH_BY_PROJECT_ID)
                .tag(this)
                .params("projectId", projectId)
                .params("time", rightTv.getText().toString())
                .execute(new LoadingDialogCallback(this, Constants.LOADING_TXT) {

                    @Override
                    public void onSuccess(String s, Call call, Response response) {
                        DustLineChartModel dustLineChartModel = null;
                        try {
                            dustLineChartModel = (DustLineChartModel) ReflectUtil
                                    .copy(DustLineChartModel.class,
                                            new JSONObject(s));
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                        if (dustLineChartModel != null) {
                            if (dustLineChartModel.code == Api.SUCCESS_CODE) {
                                if (dustLineChartModel.data != null) {
                                    setLineChartData(dustLineChartModel.data);
                                }
                            } else {
                                Application.showCodeToast(DustLineChartActivity.this, dustLineChartModel.code);
                            }
                        }

                    }

                    @Override
                    public void onError(Call call, Response response, Exception e) {
                        super.onError(call, response, e);
                        Application.showResultToast(DustLineChartActivity.this, call, e);
                    }

                });
    }

    private void setLineChartData(List<DustLineChart> dlcList) {
        listTemp.clear();
        mAxisXValues.clear();
        mAxisYValues.clear();
        distanceList.clear();
        float yMax = 0;
        try {
            int xCount = 0;
            Calendar curCalendar = Calendar.getInstance();
            String curDateStr = Utils.DATE_SIMPLE_FORMATER.format(curCalendar.getTime());
            if (rightTv.getText().toString().equals(curDateStr)) {
                xCount = curCalendar.get(Calendar.DAY_OF_MONTH);
            } else {
                Date queryDate = Utils.DATE_FORMATER.parse(rightTv.getText().toString()   "-01");
                Calendar queryCalendar = Calendar.getInstance();
                queryCalendar.setTime(queryDate);
                xCount = queryCalendar.getActualMaximum(Calendar.DAY_OF_MONTH);
            }
            LogUtil.e("xCount="   xCount);
            for (int j = 1; j <= xCount; j  ) {
                boolean isFinded = false;
                for (DustLineChart dlc : dlcList) {
                    String tempStr = dlc.time;
                    if (!Utils.isEmpty(tempStr)) {
                        Date tempDate = Utils.DATE_FORMATER.parse(tempStr);
                        Calendar tempCalendar = Calendar.getInstance();
                        tempCalendar.setTime(tempDate);
                        if (j == (tempCalendar.get(Calendar.DAY_OF_MONTH))) {
                            isFinded = true;
                            if (Utils.toFloat(dlc.pm2) > yMax) {
                                yMax = Utils.toFloat(dlc.pm2);
                            }
                            if (Utils.toFloat(dlc.pm10) > yMax) {
                                yMax = Utils.toFloat(dlc.pm10);
                            }
                            if (Utils.toFloat(dlc.windspeed) > yMax) {
                                yMax = Utils.toFloat(dlc.windspeed);
                            }
                            if (Utils.toFloat(dlc.temperature) > yMax) {
                                yMax = Utils.toFloat(dlc.temperature);
                            }
                            if (Utils.toFloat(dlc.noise) > yMax) {
                                yMax = Utils.toFloat(dlc.noise);
                            }
                            listTemp.add(new TempChartData(j   "", Utils.toFloat(dlc.pm2), Utils.toFloat(dlc.pm10),
                                    Utils.toFloat(dlc.windspeed), Utils.toFloat(dlc.temperature), Utils.toFloat(dlc.noise)));
                            break;
                        }
                    }
                }
                if (!isFinded) {
                    listTemp.add(new TempChartData(j   "", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
                }
            }

            //设置x轴坐标 ,显示的是时间5-1,5-2.。。。
            mAxisXValues.clear();
            for (int i = 1; i <= xCount; i  ) {      //mClockNumberLength
                mAxisXValues.add(new AxisValue(i).setLabel(i   ""));
            }

            mAxisYValues.clear();
            float temp = (yMax   10) / 10;
            for (int k = 0; k < 10; k  ) {
                float ttt = temp * k;
                float fff = Utils.toFloat(((int)ttt) "");
                mAxisYValues.add(new AxisValue(fff).setLabel(""   (int)fff));

            }

            //获取距离
            for (int i = 1; i <= listTemp.size(); i  ) {
                float apart = i;//得到的拒Y轴的距离
                distanceList.add(apart);
            }
            //存放线条对象的集合
            List<Line> lines = new ArrayList<Line>();
            lines.clear();
            //把数据设置到线条上面去
            for (int i = 0; i < 5;   i) {
                List<PointValue> values = new ArrayList<PointValue>();
                for (int j = 0; j < listTemp.size();   j) {
                    //i=0是最高温度的线,i=1,是最低温度的线
                    //PointValue的两个参数值,一个是距离y轴的长度距离,另一个是距离x轴长度距离
                    if (i == 0) {
                        values.add(new PointValue(distanceList.get(j), listTemp.get(j).pm2).setLabel(""   listTemp.get(j).pm2));
                    } else if (i == 1) {
                        values.add(new PointValue(distanceList.get(j), listTemp.get(j).pm10).setLabel(""   listTemp.get(j).pm10));
                    } else if (i == 2) {
                        values.add(new PointValue(distanceList.get(j), listTemp.get(j).windspeed).setLabel(""   listTemp.get(j).windspeed));
                    } else if (i == 3) {
                        values.add(new PointValue(distanceList.get(j), listTemp.get(j).temperature).setLabel(""   listTemp.get(j).temperature));
                    } else if (i == 4) {
                        values.add(new PointValue(distanceList.get(j), listTemp.get(j).noise).setLabel(""   listTemp.get(j).noise));
                    }

                }

                Line line = new Line(values);
                //设置线条的基本属性
                line.setColor(colors.get(i));
                line.setShape(shape);
                line.setCubic(isCubic);
                line.setFilled(isFilled);
                line.setHasLabels(hasLabels);
                line.setHasLabelsOnlyForSelected(hasLabelForSelected);
                line.setHasLines(hasLines);
                line.setHasPoints(hasPoints);
                line.setStrokeWidth(1);
                line.setPointRadius(3);
                lines.add(line);
            }

            data = new LineChartData(lines);

            if (hasAxes) {
                Axis axisX = new Axis();
                Axis axisY = new Axis().setHasLines(true);
                if (hasAxesNames) {
                    axisX.setName("日期");
                    axisY.setName("数值");
                }

                //对x轴,数据和属性的设置
                axisX.setTextSize(8);//设置字体的大小
                axisX.setHasTiltedLabels(false);//x坐标轴字体是斜的显示还是直的,true表示斜的
                axisX.setTextColor(Color.BLACK);//设置字体颜色
                axisX.setHasLines(true);//x轴的分割线
                axisX.setValues(mAxisXValues); //设置x轴各个坐标点名称

                //对Y轴 ,数据和属性的设置
                axisY.setTextSize(10);
                axisY.setHasTiltedLabels(false);//true表示斜的
                axisY.setTextColor(Color.BLACK);//设置字体颜色
                axisY.setValues(mAxisYValues); //设置x轴各个坐标点名称


                data.setAxisXBottom(axisX);//x轴坐标线的文字,显示在x轴下方
//            data.setAxisXTop();      //显示在x轴上方
                data.setAxisYLeft(axisY);   //显示在y轴的左边

            } else {
                data.setAxisXBottom(null);
                data.setAxisYLeft(null);
            }

            data.setBaseValue(2f); //设置反向覆盖区域颜色  ??
            data.setValueLabelBackgroundAuto(false);//设置数据背景是否跟随节点颜色
            data.setValueLabelBackgroundColor(Color.BLUE);//设置数据背景颜色
            data.setValueLabelBackgroundEnabled(false);//设置是否有数据背景
            data.setValueLabelsTextColor(Color.RED);//设置数据文字颜色
            data.setValueLabelTextSize(11);//设置数据文字大小
            data.setValueLabelTypeface(Typeface.MONOSPACE);//设置数据文字样式
            lineChart.setLineChartData(data);     //将数据添加到控件中
            lineChart.setViewportCalculationEnabled(false);

            lineChart.setZoomType(ZoomType.HORIZONTAL_AND_VERTICAL);//设置线条可以水平方向收缩
            final Viewport v = new Viewport(lineChart.getMaximumViewport());
            v.bottom = 0;
            v.top = yMax 10;
            v.left = 0;
            v.right = listTemp.size(); //  listBlood.size() - 1//如何解释
            lineChart.setMaximumViewport(v);
            lineChart.setCurrentViewport(v);

        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    public static void startActivity(Context context, String projectId) {
        Intent intent = new Intent(context, DustLineChartActivity.class);
        intent.putExtra("projectId", projectId);
        context.startActivity(intent);
    }

    @OnClick({R.id.layout_back, R.id.layout_right})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.layout_back:
                finish();
                break;
            case R.id.layout_right:
                chooseDate();
                break;
        }
    }

    private void chooseDate() {
        Calendar cal = Calendar.getInstance();
        try {
            cal.setTime(Utils.DATE_FORMATER.parse(rightTv.getText().toString() "-01"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        Calendar curCal = Calendar.getInstance();
        int curMonth = cal.get(Calendar.MONTH)   1;
        int curYear = cal.get(Calendar.YEAR);
        final DatePicker picker = new DatePicker(this, DateTimePicker.YEAR_MONTH);
        picker.setRangeEnd(curCal.get(Calendar.YEAR), curCal.get(Calendar.MONTH)   1);
        picker.setRangeStart(2010, 1);
        picker.setUseWeight(true);
        picker.setSelectedItem(curYear, curMonth);
        picker.setOnDatePickListener(new DatePicker.OnYearMonthPickListener() {
            @Override
            public void onDatePicked(String year, String month) {
                rightTv.setText(year   "-"   month);
                doRequest();
            }
        });
        picker.show();
    }
}

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持Devmax。

Android图表库HelloChart绘制多折线图的更多相关文章

  1. html5 canvas合成海报所遇问题及解决方案总结

    这篇文章主要介绍了html5 canvas合成海报所遇问题及解决方案总结,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  2. Html5 video标签视频的最佳实践

    这篇文章主要介绍了Html5 video标签视频的最佳实践,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  3. HTML5在微信内置浏览器下右上角菜单的调整字体导致页面显示错乱的问题

    HTML5在微信内置浏览器下,在右上角菜单的调整字体导致页面显示错乱的问题,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧

  4. ios – containerURLForSecurityApplicationGroupIdentifier:在iPhone和Watch模拟器上给出不同的结果

    我使用默认的XCode模板创建了一个WatchKit应用程序.我向iOSTarget,WatchkitAppTarget和WatchkitAppExtensionTarget添加了应用程序组权利.(这是应用程序组名称:group.com.lombax.fiveminutes)然后,我尝试使用iOSApp和WatchKitExtension访问共享文件夹URL:延期:iOS应用:但是,测试NSURL

  5. Ionic – Splash Screen适用于iOS,但不适用于Android

    我有一个离子应用程序,其中使用CLI命令离子资源生成的启动画面和图标iOS版本与正在渲染的启动画面完美配合,但在Android版本中,只有在加载应用程序时才会显示白屏.我检查了config.xml文件,所有路径看起来都是正确的,生成的图像出现在相应的文件夹中.(我使用了splash.psd模板来生成它们.我错过了什么?这是config.xml文件供参考,我觉得我在这里做错了–解决方法在config.xml中添加以下键:它对我有用!

  6. ios – 无法启动iPhone模拟器

    /Library/Developer/CoreSimulator/Devices/530A44CB-5978-4926-9E91-E9DBD5BFB105/data/Containers/Bundle/Application/07612A5C-659D-4C04-ACD3-D211D2830E17/ProductName.app/ProductName然后,如果您在Xcode构建设置中选择标准体系结构并再次构建和运行,则会产生以下结果:dyld:lazysymbolbindingFailed:Symbol

  7. Xamarin iOS图像在Grid内部重叠

    heyo,所以在Xamarin我有一个使用并在其中包含一对,所有这些都包含在内.这在Xamarin.Android中看起来完全没问题,但是在Xamarin.iOS中,图像与标签重叠.我不确定它的区别是什么–为什么它在Xamarin.Android中看起来不错但在iOS中它的全部都不稳定?

  8. 在iOS上向后播放HTML5视频

    我试图在iPad上反向播放HTML5视频.HTML5元素包括一个名为playbackRate的属性,它允许以更快或更慢的速率或相反的方式播放视频.根据Apple’sdocumentation,iOS不支持此属性.通过每秒多次设置currentTime属性,可以反复播放,而无需使用playbackRate.这种方法适用于桌面Safari,但似乎在iOS设备上的搜索限制为每秒1次更新–在我的情况下太慢了.有没有办法在iOS设备上向后播放HTML5视频?解决方法iOS6Safari现在支持playbackRat

  9. 使用 Swift 语言编写 Android 应用入门

    Swift标准库可以编译安卓armv7的内核,这使得可以在安卓移动设备上执行Swift语句代码。做梦,虽然Swift编译器可以胜任在安卓设备上编译Swift代码并运行。这需要的不仅仅是用Swift标准库编写一个APP,更多的是你需要一些框架来搭建你的应用用户界面,以上这些Swift标准库不能提供。简单来说,构建在安卓设备上使用的Swiftstdlib需要libiconv和libicu。通过命令行执行以下命令:gitclonegit@github.com:SwiftAndroid/libiconv-libi

  10. Android – 调用GONE然后VISIBLE使视图显示在错误的位置

    我有两个视图,A和B,视图A在视图B上方.当我以编程方式将视图A设置为GONE时,它将消失,并且它正下方的视图将转到视图A的位置.但是,当我再次将相同的视图设置为VISIBLE时,它会在视图B上显示.我不希望这样.我希望视图B回到原来的位置,这是我认为会发生的事情.我怎样才能做到这一点?编辑–代码}这里是XML:解决方法您可以尝试将两个视图放在RelativeLayout中并相对于彼此设置它们的位置.

随机推荐

  1. Flutter 网络请求框架封装详解

    这篇文章主要介绍了Flutter 网络请求框架封装详解,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

  2. Android单选按钮RadioButton的使用详解

    今天小编就为大家分享一篇关于Android单选按钮RadioButton的使用详解,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧

  3. 解决android studio 打包发现generate signed apk 消失不见问题

    这篇文章主要介绍了解决android studio 打包发现generate signed apk 消失不见问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧

  4. Android 实现自定义圆形listview功能的实例代码

    这篇文章主要介绍了Android 实现自定义圆形listview功能的实例代码,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

  5. 详解Android studio 动态fragment的用法

    这篇文章主要介绍了Android studio 动态fragment的用法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

  6. Android用RecyclerView实现图标拖拽排序以及增删管理

    这篇文章主要介绍了Android用RecyclerView实现图标拖拽排序以及增删管理的方法,帮助大家更好的理解和学习使用Android,感兴趣的朋友可以了解下

  7. Android notifyDataSetChanged() 动态更新ListView案例详解

    这篇文章主要介绍了Android notifyDataSetChanged() 动态更新ListView案例详解,本篇文章通过简要的案例,讲解了该项技术的了解与使用,以下就是详细内容,需要的朋友可以参考下

  8. Android自定义View实现弹幕效果

    这篇文章主要为大家详细介绍了Android自定义View实现弹幕效果,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

  9. Android自定义View实现跟随手指移动

    这篇文章主要为大家详细介绍了Android自定义View实现跟随手指移动,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

  10. Android实现多点触摸操作

    这篇文章主要介绍了Android实现多点触摸操作,实现图片的放大、缩小和旋转等处理,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下

返回
顶部