用UIL显示图像的Pinterest风格 [英] Pinterest Style in Displaying Images with UIL

查看:199
本文介绍了用UIL显示图像的Pinterest风格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显示图像的Pinterest风格非常出色,这为您的应用增添了美感。经过几次研究后,我发现有很好的库可以显示像Pinterest这样的图像,但不确定它是否与UIL兼容。

Pinterest Style of Displaying Images is exceptional, and this adds beauty to your app. After a couple of research I found out that there are great libraries out there that can display images like Pinterest do but not sure if this is compatible with UIL.

我正在使用Universal-Image-Loader显示我的图像。在下面显示的图像中,我以这种方式显示了我的图像,并带有一些视图。无可否认,UIL库在显示大量图像时极大地处理了手机内存。我想知道是否有可能像Pinterest那样显示我的图像,但仍然使用UIL作为生成器。这种方法有什么可能的解决方案?或者可能是另一个只处理显示并与UIL兼容的库。

I am using the Universal-Image-Loader in displaying my images. In the image shown below I got my images displayed in that manner with some views together with it. It is undeniably true that UIL library handles phone memory greatly in displaying a lot the images. I'd like to know if it is possible to display my images like the Pinterest's but still using UIL as the generator. What are the possible resolve to this approach? Or maybe another library that only handles the display and compatible with UIL.

<?xml version="1.0" encoding="utf-8"?>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/gridview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:gravity="center"
    android:horizontalSpacing="4dip"
    android:numColumns="3"
    android:stretchMode="columnWidth"
    android:verticalSpacing="4dip"
    android:padding="4dip" />

更新:

我试过使用 StaggeredGridView 但布局无法转换为 GridView

I tried using the StaggeredGridView but the layout can't be cast to GridView.

 <com.origamilabs.library.views.StaggeredGridView
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:staggered="http://schemas.android.com/apk/res-auto"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/gridview"
        staggered:numColumns="3"
        staggered:drawSelectorOnTop="true"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />


推荐答案

嘿使用<查看我对Pinterest类型视图的实现code> Staggered GridView 和 Universal-Image-Loader 这里

这篇关于用UIL显示图像的Pinterest风格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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