Android:如何实现像 facebook 照片一样的功能
我想实现与 Facebook 相册 viz 中相同的功能。首先它显示模糊图像,然后显示带有滑动效果的清晰版本,但我不知道从哪里开始。
编辑:我将从网络服务器获取这些图像。
I want to implement functionality same like in Facebook album viz. first it show blur image then clear version of that with swipe effect but I am not getting any idea from where to start from.
EDIT: I will be getting these images from webserver.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
实际上发生的情况是:
如果大图像未加载,Facebook 会显示其缩略图(已下载)。所以它并不是故意模糊的。
并在后台下载原始图像。然后将大图像设置为该
ImageView
。大量示例可用于在 Android 中显示图库。
Actually what happens is:
Facebook show its thumbnail image(which is already downloaded) if the large image is not loaded. So it is not intentionally blurred.
and downloads the original image in background. and then sets the large image to that
ImageView
.Numerous examples are available to show Gallery in Android.
据我所知,Facebook 应用程序中显示的“模糊照片”实际上并不是 Android 功能,而更多的是嵌入式 WebView 处理图像的方式。 Facebook 应用程序基本上只是一个嵌入式 Web 视图,希望外观和感觉像原生 Android 应用程序。
对于滑动手势查看下一张照片,您可以使用 这个。
afaik the "blurred photo" displaying in Facebook app is not actually an android feature, but more of how the embedded WebView handles images. Facebook App is basically just an embedded webview that hopes to look and feel like a native android app.
For the swiping gesture to view the next photo, you can use this.
尝试创建一个扩展 Android Gallery 的自定义类
,然后尝试应用模糊效果在左图像视图和右图像视图上。
Try making a custom class extending Android Gallery
And then try applying a blur effete on both Left and Right imageviews.