手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >Android实现EditText内容保存为Bitmap的方法
Android实现EditText内容保存为Bitmap的方法
摘要:本文实例讲述了Android实现EditText内容保存为Bitmap的方法。分享给大家供大家参考,具体如下:主要代码如下:privatev...

本文实例讲述了Android实现EditText内容保存为Bitmap的方法。分享给大家供大家参考,具体如下:

主要代码如下:

private void saveEidtTextAsBitmap() { if(mEditText == null) return; mEditText.setDrawingCacheEnabled(true); Bitmap bitmap = mEditText.getDrawingCache(); if(bitmap != null) { saveBitmap(bitmap); } else { Toast.makeText(this, "save image error", Toast.LENGTH_SHORT).show(); finish(); } }

希望本文所述对大家Android程序设计有所帮助。

【Android实现EditText内容保存为Bitmap的方法】相关文章:

Android应用开发中对Bitmap的内存优化

android中添加按钮事件的方法

Android中实现EditText圆角的方法

Android实现TextView中文字链接的4种方式介绍及代码

在Android中访问WebService接口的方法

android中实现指针滑动的动态效果方法

Android控件系列之RadioButton与RadioGroup使用方法

android中查看项目数字证书的两种方法

Android 进入设备后台data文件夹的办法

android将Bitmap对象保存到SD卡中的方法

精品推荐
分类导航