【问题标题】:Pinterest Style in Displaying Images with UIL使用 UIL 显示图像的 Pinterest 风格
【发布时间】:2023-04-10 07:47:02
【问题描述】:

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

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

 <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" />

【问题讨论】:

  • 请在投票中添加理由/正义,以便我改进我的问题。

标签: java android android-gridview pinterest universal-image-loader


【解决方案1】:

嘿,看看我使用 Staggered GridViewUniversal-Image-Loader here 实现的 Pinterest 类型视图。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-03-21
    • 2014-04-06
    • 2018-07-16
    • 1970-01-01
    • 2016-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多