TimeLine
½éÉÜ£º
ÆÙ²¼Á÷ʽ×óÓÒ½»´íµÄʱ¼äÖá¡£
ÔËÐÐЧ¹û£º
ʹÓÃ˵Ã÷£º
ʹÓÃStaggerGridLayoutManagerÉèÖÃLayoutManager£¬²¢Ìí¼Ó×Ô¶¨ÒåµÄItemDecoration¡£ ÆäÖУ¬ItemDecorationµÄµÚ¶þ¸ö²ÎÊýÓÃÀ´ÉèÖÃitemÖ®¼äµÄ¼ä¸ô¡£
mRecyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
mRecyclerView.addItemDecoration(new ItemDecoration(this,100));
ÔÀí
ÓÃStaggerGridLayoutManagerʵÏÖÁËÀàËÆÆÙ²¼Á÷µÄЧ¹û£¬È»ºóÔÚItemDecorationÖл³ö·Ö¸îÏßµÄЧ¹û¡£ ÔÚItemDecorationÖзֱð»Á˺áÏß¡¢ÊúÏß¡¢»¹ÓÐʱ¼äµÄͼ±êÕâÈý¸öÀ´ÊµÏÖʱ¼äÖáµÄЧ¹û¡£
已下载
0