加载图像从使用毕加索服务器不同的屏幕尺寸? [英] Load images for different screen sizes from the server using picasso?

查看:137
本文介绍了加载图像从使用毕加索服务器不同的屏幕尺寸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我是做在我从服务器获取图像的Andr​​oid应用程序,并为我使用毕加索库现在我的问题是,因为有不同尺寸屏幕的不同密度,包括(LDPI,MDPI,华电国际, xhdpi)为不同的设备需要现在我想在后台知道不毕加索本身做一些事情,这样,如果我将打开一个高密度的PIC上的小屏幕手机那么它不会得到模糊,要么就是挂我电话或无论如何,这样它可以动态地调整各设备的照片。我可以使用ninepatch图像解决我的查询。

更新 - 我读答案毕加索本身处理所有这些问题的密度,但在我的情况下我在做什么,因为什么我的 recyclerview挂?<错误/ p>

解决方案

ninepatch用于系统元件的图像,而不是图片。
您还没有指定图像的界面或内容的一部分。

您可以在屏幕的密度和软件和拉伸/ COM $ P $的分辨率PSS图像。 (我会在你的地方是不怕在低失真的设备和内存的问题),那么,你可以做服务器上的多组的图形,如果这样担心。

但最重要的是,你真的会处理这个响应的解决方案

但它的怪异,是诚实的。我们需要更多的信息。
我通常使用可绘制-XXX,ninepatch的按钮(backgound板......),和拉伸/ COM preSS
对内容RapidDe codeR

Hello i am making an android app in which i am getting images from the server and for that i am using picasso library now my question is that as there are different densities of screens with different sizes including (ldpi, mdpi, hdpi, xhdpi )required for different devices now i want to know in background does picasso itself do something so that if i will open an high density pic on an small screen size mobile then it will not get blurred or something or hang my phone or anyway so that it can dynamically adjust the pic for respective devices. Can i use ninepatch images for resolving my query.

Update- i have read answers that picasso itself handle all these densities problems but in my case what am i doing wrong because of what my recyclerview is hanging ??

解决方案

ninepatch used for system elements images rather than pictures. You have not specified the image is part of the interface or content.

You can get the density of the screen and the resolution of software and stretch / compress the image. (I would in your place was not afraid of distortion and memory problems in the low devices) So what can you do multiple sets of graphics on the server, if so worried.

But most of all, you really will approach the solution of this response.

But it's weird, to be honest. We need more information. I normally use drawable-XXX, ninepatch for buttons (backgound panels...), and stretch / compress on RapidDecoder for content.

这篇关于加载图像从使用毕加索服务器不同的屏幕尺寸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆