Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Android ListView中显示SQL Server数据库中的Base64图像数据_Android - Fatal编程技术网

在Android ListView中显示SQL Server数据库中的Base64图像数据

在Android ListView中显示SQL Server数据库中的Base64图像数据,android,Android,我已经通过Android应用程序将一张移动相机的图像保存到SQLServer数据库中,以及其他一些包含文本数据的列 现在我想在Android列表视图中显示数据,并且我能够显示文本字段。但是我无法显示保存的图像。我建议将图像保存在移动存储器中,并将图像路径保存在数据库中。这是一种速度更快、效率更高的方法。使用以下方法对图像进行编码: byte[] bytes = Base64.decode(base64String, Base64.DEFAULT); Bitmap bitmap = BitmapF

我已经通过Android应用程序将一张移动相机的图像保存到SQLServer数据库中,以及其他一些包含文本数据的列


现在我想在Android列表视图中显示数据,并且我能够显示文本字段。但是我无法显示保存的图像。

我建议将图像保存在移动存储器中,并将图像路径保存在数据库中。这是一种速度更快、效率更高的方法。

使用以下方法对图像进行编码:

byte[] bytes = Base64.decode(base64String, Base64.DEFAULT);
Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);

让我们看看你已经拥有了什么。为什么主题中提到的东西没有出现在你的帖子中?