okgo Glide 蓝牙

OKGO是OK HTTP 为底层的第三方
get post 上传都是String泛型 下载为File泛型 可以直接下载推片泛型为BitMap
可以在OKGO里直接更新UI 可以直接获取Progress进度
Gide
三级缓存 内存 sd卡 网络
clearMermoy 清除内存 clearDiskCache 清除sd卡 是一个耗时操作需要在子线程运行
可以加在任何形式的图片 例如Sd卡 网络 动态 视频
加载圆角
Glide.with(getContext()).load(“图片网址”).apply(new RequestOptions().placeholder(R.mipmap.ic_launcher).error(R.mipmap.ic_launcher).bitmapTransform(new RoundedCorners(50))).into(控件);
加载圆形
Glide.with(this)
.load(“网址”).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(控件)
设置占位符和错误图
placeholder error

蓝牙
一种无线传输数据 短距离进行交流的工具
权限



开启蓝牙
Intent intent=new Intent();
intent.setAction(BluetoothAdapter.ACTION_REQUEST_ENABLE);
intent.setAction(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION,200);
startActivityForResult(intent,100);

关闭蓝牙
manager= (BluetoothManager) getContext().getSystemService(getContext().BLUETOOTH_SERVICE);
adapter = manager.getAdapter();
adapter.disable();

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值