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