android获取View上某点的颜色
2015-07-23 14:50
267 查看
//根据坐标获取 ImageView imageView = ((ImageView)v);
Bitmap bitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();
int pixel = bitmap.getPixel(x,y);
//获取颜色 int redValue = Color.red(pixel);
int blueValue = Color.blue(pixel);
int greenValue = Color.green(pixel);
Bitmap bitmap = ((BitmapDrawable)imageView.getDrawable()).getBitmap();
int pixel = bitmap.getPixel(x,y);
//获取颜色 int redValue = Color.red(pixel);
int blueValue = Color.blue(pixel);
int greenValue = Color.green(pixel);
相关文章推荐
- Android客户端向服务器端发送数据的流程(1)
- Android ArrayAdapter 详解
- Android 如何修改PrograssBar的背景图片?
- Android
- 麦子学院android老师分享android实现listview异步加载图片的方法
- Android GridView中Item宽高不正常的问题解决
- Android Google购买PHP服务器端验证(订阅购买和一次性购买)
- android开发入门笔记:AIDL简单入门
- android postDelayed方法实现定时器
- Android碎片第一期
- 出现Error inflating class android.support.v7.widget.RecyclerView错误的解决办法
- android 命令获取手机中项目数据库
- Android 获取当前资源对象的屏幕信息
- android基础知识之AIDL简单入门
- android基础知识之AIDL简单入门
- Android源码之陌陌源码
- Android Service 不被杀死并提高优先级
- Android中adb push和adb install的使用区别
- Android下载并安装APK
- android学习——应用界面编程