E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
BitmapDrawable
Drawable、Bitmap、byte[]之间的转换
1、Drawable→Bitmappublicstatic
Bitmapdrawable
ToBitmap(Drawabledrawable){Bitmapbitmap=Bitmap.createBitmap
L_serein
·
2020-08-20 02:17
Android
自定义ImageView实现圆形头像
publicclassCircleImageViewextendsImageView{privatePaintmPaint;//画笔privateintmin;private
BitmapDrawable
bitmapDrawabl
麦兜叮叮当
·
2020-08-20 01:30
ZUI易入门Android之bitmap-and-drawable
一、相关概念1、Drawable就是一个可画的对象,其可能是一张位图(
BitmapDrawable
),也可能是一个图形(ShapeDrawable),还有可能是一个图层(LayerDrawable),我们根据画图的需求
行知天下
·
2020-08-19 18:27
ZUI易入门Android
setBackground()版本兼容问题
:java.lang.NoSuchMethodError:x.x.x.setBackground所以低版本需要用setBackgroundDrawable来代替Drawabledraeable=new
BitmapDrawable
invokerker
·
2020-08-18 20:47
笔记
Android
Android 图像系列: 将本地图片加载到Drawable
/***将文件生成位图*@parampath*@return*@throwsIOException*/public
BitmapDrawable
getImageDrawable(Stringpath)throwsIOException
克雷斯
·
2020-08-18 08:16
Android
SurfaceView中的PNG格式图片隐藏不见的原因-背景覆盖
//设置背景setBackgroundResource(R.drawable.background);//获得图片
bitmapDrawable
=(
BitmapDrawable
)getResources(
歪神
·
2020-08-17 06:38
android
仿照支付宝可拖动gridview
显示图像用一个
BitmapDrawable
移动的时候设置它的bounds,并调用invalidate函数重绘。publicvoidstartDrag(intposition){if(po
ddovetlose
·
2020-08-15 13:34
android
Kotlin04.ImageView图片浏览器
MainActivity.ktpackagecom.example.imageviewtestimportandroid.graphics.Bitmapimportandroid.graphics.drawable.
BitmapDrawable
importandroid.media.Imageimportandroidx.appcompat.app.AppC
augfun
·
2020-08-15 13:57
Kotlin
android 中Drawable跟Bitmap转换及常用于图片相关操作方法 - Android
publicclassImageTools{//Drawable-->Bitmappublicstatic
Bitmapdrawable
ToBitmap(Drawabledrawable){intwidth
木木德菲斯
·
2020-08-13 19:11
Android
Drawable和Bitmap转换
一、Bitmap转DrawableBitmapbm=xxx;//xxx根据你的情况获取
BitmapDrawable
bd=new
BitmapDrawable
(bm);因为BtimapDrawable是Drawable
木木德菲斯
·
2020-08-13 19:11
Android
android 图片缩略图显示
inputStream对象InputStreaminputStream=getResources().openRawResource(R.drawable.temp);//通过一个InputStream创建一个
BitmapDrawable
iteye_3941
·
2020-08-13 14:15
直播间搭建实现图片浏览,改变透明度的方法
importandroidx.appcompat.app.AppCompatActivity;importandroid.graphics.Bitmap;importandroid.graphics.drawable.
BitmapDrawable
云豹网络科技
·
2020-08-12 16:32
技术类
android
android
studio
bitmap
app
ios
Bitmap处理之创建可自动回收资源的ImageView
转载地址:http://blog.csdn.net/android_learn/article/details/8837234#t5[-]创建可自动回收资源的
BitmapDrawable
判断bitmap
xxxxxhua
·
2020-08-12 15:41
android
内存管理
popupWindow的使用:点击外面的时候消失或者不消失,都可以进行控制
finalPopupWindowmPopupWindow=newPopupWindow();//设置popupWindow,当点击popupWindow外面的时候可以消失mPopupWindow.setBackgroundDrawable(new
BitmapDrawable
滴水成冰-
·
2020-08-11 02:06
Androi开发问题解决
PopupWindow 点击外部消失
需要点击返回键和点击popuwindown外部使popwindow消失showAtLocation调用之前,设置以下此参数popupWindow.setBackgroundDrawable(new
BitmapDrawable
御诺诺诺诺诺诺诺
·
2020-08-10 18:24
视图
android PopupWindow点击外部和返回键消失
androidPopupWindow点击外部和返回键消失加入:popupWindow.setOutsideTouchable(true);popupWindow.setBackgroundDrawable(new
BitmapDrawable
黄成科
·
2020-08-10 16:30
android
Bitmap处理之创建可自动回收资源的ImageView
1.创建可自动回收资源的
BitmapDrawable
继承
BitmapDrawable
,设置标志位mCacheRefCountcache计数,mDisplayRefCount显示计数,mHasBeenDisplayed
android_learn
·
2020-08-10 15:31
android
basic
popup window点击窗口外区域不消失的解决方法
:popupWindow.setTouchable(true);popupWindow.setFocusable(true);popupWindow.setBackgroundDrawable(new
BitmapDrawable
赵小刚
·
2020-08-10 15:31
移动开发
StateListDrawable cannot be cast to android.graphics.drawable.
BitmapDrawable
报这个错误是在我的自定义imageview里面产生的,由于自己用了picasso框架,最先还以为是picasso的图片加载到我的控件中格式错误,最后发现我在填充自定义imageview的时候,错误和默认图片都是xml格式的图片,StateListDrawable就是这个格式的图片,而在我的ondraw函数里面我是直接getdraw得到图片的,如果服务器不存在图片的话,默认的xmL文件就会填充图片,
Super-B
·
2020-08-10 01:19
android
Android PopupWindow显示位置和显示大小
packagecom.example.showpop;importandroid.app.Activity;importandroid.content.Context;importandroid.graphics.drawable.
BitmapDrawable
小_源
·
2020-08-10 01:07
Android
Android学习-第57天
packagecom.bignerdranch.android.photogallery;importandroid.graphics.Bitmap;importandroid.graphics.drawable.
BitmapDrawable
WeltKrieg
·
2020-08-09 23:47
Android
GradientDrawable cannot be cast to android.graphics.drawable.
BitmapDrawable
java.lang.ClassCastException:android.graphics.drawable.GradientDrawablecannotbecasttoandroid.graphics.drawable.
BitmapDrawable
pang9998
·
2020-08-09 22:50
Android启动页图片适配
一、在drawable中创建一个xml文件:splah.xml传送门:
BitmapDrawable
(可控制对齐平铺的图像)二、设置启动页主题true@drawable/splah@color/common_color_whitefalse
azhoufeng
·
2020-08-09 19:15
Android
Android问题——PopupWindow的isShowing()一直都是返回false
且使能了外部触摸setBackgroundDrawable(new
BitmapDrawable
());setOutsideTouchable(true)然后在按钮中获取isShowing()的状态,结果一直返回的都是
a10615
·
2020-08-09 19:23
Android
java.lang.ClassCastException 在 android 当尝试获取应用程序的图标
java.lang.ClassCastException:android.graphics.drawable.NinePatchDrawablecannotbecasttoandroid.graphics.drawable.
BitmapDrawable
Kitty_London
·
2020-08-09 18:50
Android应用
Android基础知识
JAVA + 图片 + 头像 + 圆形
importandroid.graphics.Bitmap;importandroid.graphics.BitmapFactory;importandroid.support.v4.graphics.drawable.Rounded
BitmapDrawable
xiaoniba987
·
2020-08-07 22:50
Android 更换壁纸 代码
更换壁纸通过代码:步骤:1,添加权限:2,代码设置:privatevoidinitSkin(){try{//使用资源文件当然你也可以使用其他图片bitmap
BitmapDrawable
bitmap=(
BitmapDrawable
zq_Hero
·
2020-08-07 19:41
[Android]
实现圆形头像的几种方法
1.用谷歌自带Round
BitmapDrawable
制作,代码如下:privatevoidsetBitmapCircle(){Bitmapb=BitmapFactory.decodeResource(getResources
Liao_Jason
·
2020-08-07 11:22
Android Bitmap和Canvas学习笔记(转)
1.从资源中获取位图可以使用
BitmapDrawable
或者BitmapFactory来获取资源中的位图。
weixin_34372728
·
2020-08-05 03:16
android 创建bitmap的多种方式
–Bitmap代表这一张位图,
BitmapDrawable
里封装的图片就是一个Bitmap对象。如果要将Bitmap对象封装成
BitmapDrawable
对象只需要用构造方法即可。
进击的乌龟
·
2020-08-04 03:31
android学习
Android Activity与Activity之间传图片,数据。
代码如下://BitmapBitmapphoto_bitmap;//存储照片photo_bitmap=((
BitmapDrawable
)gesture_zero.getDrawable()).getBitmap
小徐爱敲代码
·
2020-08-03 19:27
Android中Bitmap,byte[],Drawable相互转化
一、相关概念1、Drawable就是一个可画的对象,其可能是一张位图(
BitmapDrawable
),也可能是一个图形(ShapeDrawable),还有可能是一个图层(LayerDrawable),我们根据画图的需求
跳跳
·
2020-08-03 09:42
Android—UI—小技巧
Bitmap
bitmap
BitMap
byte
BYTE
Drawable
相互转化
强大的bitmapData.draw()
draw()方法publicfunctiondraw(source:I
BitmapDrawable
,matrix:Matrix=null,colorTransform:ColorTransform=null
Xiang08
·
2020-08-03 08:43
Flash
Flex
Glide 加载圆形头像方法
).into(newBitmapImageViewTarget(imageView){@OverrideprotectedvoidsetResource(Bitmapresource){Rounded
BitmapDrawable
circular
BitmapDrawable
追兔子的狼
·
2020-08-03 08:19
android
App启动时白屏&使用
BitmapDrawable
解决启动页背景图片拉伸
二,
BitmapDrawable
解决启动页背景图片拉伸上面的background属性为一张启
☆☆张
·
2020-08-03 05:54
bug记录
RadioButton 消除自带圆圈效果需要注意版本适配
特此记录:在AndroidAPI19环境下,RadioButton如果需要消除自带的圆圈效果只能以代码的形式来设置:mRadioButton.setButtonDrawable(new
BitmapDrawable
青衫禅客
·
2020-08-03 05:44
Android
Android 设置圆角图片
主要原理是使用系统自带api:Rounded
BitmapDrawable
Factory先上效果图:由于比较简单,直接给出实现方式:publicclassMainActivityextendsAppCompatActivit
青雨xh
·
2020-08-03 05:05
Android
自定义View
Android将图片转为字节流存储在SharedPreferences
publicstaticvoidputImageToShare(ContextmContext,ImageViewimageView){
BitmapDrawable
drawable=(
BitmapDrawable
qq_34858228
·
2020-08-03 03:25
android
android studio drawable文件夹导入图片资源报错
最近课设选择Android来发,新手入门在导入图片资源时1.导入到drawable文件夹真机运行失败,
BitMapDrawable
一路飘红2.导入到mipmap文件夹真机运行失真首先,根本问题在于Android
Deicide_______
·
2020-08-02 21:03
Android
Android中Bitmap和Drawable
一、相关概念1、Drawable就是一个可画的对象,其可能是一张位图(
BitmapDrawable
),也可能是一个图形(ShapeDrawable),还有可能是一个图层(LayerDrawable),我们根据画图的需求
weixin_33787529
·
2020-08-01 04:52
Android Support Library 实用介绍
新建项目时默认自动加载,主要包含Fragment支持、ViewPager、DrawerLayout等ColorUtils:颜色叠加复合、混合;亮度、对比度计算;HSL、LAB、XYZ模式转换Rounded
BitmapDrawable
Factory
Wavky
·
2020-08-01 02:48
android 从矢量图SVG获取位图bitmap
DrawableResintdrawableId){Drawabledrawable=ContextCompat.getDrawable(context,drawableId);if(drawableinstanceof
BitmapDrawable
陈科肇
·
2020-08-01 02:16
Android
Android实现圆角照片和圆形照片
方法1:使用Rounded
BitmapDrawable
publicstaticRounded
BitmapDrawable
bitmapToRoundedDrawable(@NonNullResourcesres
usetsai
·
2020-08-01 01:05
Android
ClassCastException:AdaptiveIconDrawable cannot be cast to
BitmapDrawable
java.lang.ClassCastException:android.graphics.drawable.AdaptiveIconDrawablecannotbecasttoandroid.graphics.drawable.
BitmapDrawable
usetsai
·
2020-08-01 01:04
Android
Android又一个超漂亮的日历控件
importjava.util.List;importandroid.app.Activity;importandroid.content.Context;importandroid.graphics.drawable.
BitmapDrawable
DylanAndroid
·
2020-08-01 01:51
Android
Android Bitmap用法大全,以后再也不担心了
123456789101112131415161718192021222324252627publicstatic
Bitmapdrawable
ToBitmap(Drawabledrawable){Bitmapbitmap
蜗牛改变自己
·
2020-08-01 01:33
Android
bitmap
Android系统截屏
importandroid.graphics.Bitmap;importandroid.graphics.Canvas;importandroid.graphics.Matrix;importandroid.graphics.drawable.
BitmapDrawable
solarsaber
·
2020-08-01 00:14
Android系统开发
Android 实现圆形的 ImageView 的3种方法
Bitmap,然后设置给ImageViewsrc或者background实际使用中发现系统app的ICON比较特殊,比如时钟/日历是动态的,把通过PackageManager拿到的Drawable转成
BitmapDrawable
zhangle789
·
2020-07-31 19:15
Android
android
android 图片处理工具类
如:bitmapToDrawable(Bitmapb)bimap转换为drawabledrawableToBitmap(Drawabled)drawable转换为
bitmapdrawable
ToByte
hhlin1
·
2020-07-31 18:17
android
Android--截屏(支持Android7.1.1,无需root)
importandroid.content.pm.PackageManager;importandroid.graphics.Bitmap;importandroid.graphics.drawable.
BitmapDrawable
chaoyu168
·
2020-07-31 16:47
Android
Android开发
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他