美文网首页
RecyclerView实现瀑布流

RecyclerView实现瀑布流

作者: 小慧sir | 来源:发表于2019-07-17 19:51 被阅读0次
   //设置管理器
mRecycview.setLayoutManager(new StaggeredGridLayoutManager(2,StaggeredGridLayoutManager.VERTICAL));

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    android:id="@+id/image_one"
    android:adjustViewBounds="true"
    android:scaleType="fitXY"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    />
        android:id="@+id/text_one"
        android:textSize="25dp"
        android:gravity="right"
        android:text="1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        />

相关文章

网友评论

      本文标题:RecyclerView实现瀑布流

      本文链接:https://www.haomeiwen.com/subject/mwjclctx.html