• 大小: 1.72M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-23
  • 语言: Java
  • 标签: 蓝牙  画图  接收  

资源简介


class DrawThread extends Thread {


private int oldX = 0;// 上次绘制的X坐标
private int oldY = 0;// 上次绘制的Y坐标
private SurfaceView sfv;// 画板
private int X_index = 0;// 当前画图所在屏幕X轴的坐标
private Paint mPaint;// 画笔
private int wait = 50;// 线程等待时间

public DrawThread(SurfaceView sfv, Paint mPaint, int wait) {
this.sfv = sfv;
this.mPaint = mPaint;
this.wait = wait;
}

public void run() {
while (isRecording) {
try {

byte[] temp = new byte[1024];

int len = is.read(temp);
Log.e("available", String.valueOf(len));
if (len > 0) {
byte[] btBuf = new byte[len];
System.arraycopy(temp, 0, btBuf, 0, btBuf.length);
SimpleDraw(X_index, btBuf, rateX, rateY, baseLine);// 把缓冲区数据画出来
X_index = X_index (btBuf.length/rateX) - 1;// 这里-1可以减少空隙
if (X_index > sfv.getHeight()) {
X_index = 0;
}
}
Thread.sleep(wait);// 延时一定时间缓冲数据
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
}

资源截图

代码片段和文件信息

/** Automatically generated file. DO NOT MODIFY */
package com.example.bluetooth;

public final class BuildConfig {
    public final static boolean DEBUG = true;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        475  2016-01-18 10:56  Bluetooth\.classpath

     文件        845  2016-01-18 10:56  Bluetooth\.project

     文件        177  2016-01-18 11:32  Bluetooth\.settings\org.eclipse.jdt.core.prefs

     文件       1162  2016-01-18 14:29  Bluetooth\AndroidManifest.xml

     文件       1162  2016-01-18 14:29  Bluetooth\bin\AndroidManifest.xml

     文件     326734  2016-01-20 16:43  Bluetooth\bin\Bluetooth.apk

     文件        351  2016-01-18 15:19  Bluetooth\bin\classes\com\example\bluetooth\BuildConfig.class

     文件        577  2016-01-20 14:31  Bluetooth\bin\classes\com\example\bluetooth\Constants.class

     文件        962  2016-01-20 16:43  Bluetooth\bin\classes\com\example\bluetooth\deviceAdapter$ViewHolder.class

     文件       2450  2016-01-20 16:43  Bluetooth\bin\classes\com\example\bluetooth\deviceAdapter.class

     文件       1814  2016-01-20 17:05  Bluetooth\bin\classes\com\example\bluetooth\MainActivity$1.class

     文件       2737  2016-01-20 17:05  Bluetooth\bin\classes\com\example\bluetooth\MainActivity$2.class

     文件      10893  2016-01-20 17:05  Bluetooth\bin\classes\com\example\bluetooth\MainActivity.class

     文件        349  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$attr.class

     文件        470  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$dimen.class

     文件        416  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$drawable.class

     文件        660  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$id.class

     文件        521  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$layout.class

     文件        431  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$menu.class

     文件        530  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$string.class

     文件        440  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R$style.class

     文件        703  2016-01-20 15:51  Bluetooth\bin\classes\com\example\bluetooth\R.class

     文件        869  2016-01-20 15:49  Bluetooth\bin\classes\com\example\bluetooth\Tools.class

     文件     830016  2016-01-20 16:43  Bluetooth\bin\classes.dex

     文件     277435  2016-01-18 15:16  Bluetooth\bin\dexedLibs\android-support-v4-cdeddc178ddac56ba8f9b8020fb63c24.jar

     文件        120  2016-01-20 14:23  Bluetooth\bin\jarlist.cache

     文件       5964  2016-01-18 15:16  Bluetooth\bin\res\crunch\drawable-hdpi\ic_launcher.png

     文件       3112  2016-01-18 15:16  Bluetooth\bin\res\crunch\drawable-mdpi\ic_launcher.png

     文件       9355  2016-01-18 15:16  Bluetooth\bin\res\crunch\drawable-xhdpi\ic_launcher.png

     文件      17889  2016-01-18 15:16  Bluetooth\bin\res\crunch\drawable-xxhdpi\ic_launcher.png

............此处省略153个文件信息

评论

共有 条评论