Gridlayout和交错Gridlayout之间的区别

Gridlayout和交错Gridlayout之间的区别

本文介绍了Android-Gridlayout和交错Gridlayout之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用android material design api&想要以网格格式显示一些数据.我试过GridLayoutStaggeredGridlayout都看起来一样.有关一般信息,我想问 GridlayoutStaggeredGridlayout有什么区别?

谢谢.

I am working in android material design api & want to display some data in grid format. I tried both GridLayout and StaggeredGridlayout and both look same. For general information, i want to ask what is the difference between Gridlayout and StaggeredGridlayout?

Thank you.

推荐答案

网格视图:这是一个ViewGroup,用于在二维可滚动网格中显示项目.在这种情况下,每个 网格具有相同的大小(高度和宽度). 网格视图在视图中显示对称项.

Grid View : It is is a ViewGroup that displays items in a two-dimensional, scrollable grid. In this each Grid is of same size (Height and width). Grid View shows symmetric items in view.

交错网格视图:它基本上是对Grid View的扩展,但是在每个 网格中,网格的大小(高度和宽度)都是变化的 .交错网格视图在视图中显示不对称项.

Staggered Grid View : It is basically an extension to Grid View but in this each Grid is of varying size(Height and width). Staggered Grid View shows asymmetric items in view.

实现交错网格视图的教程:

Tutorial to implement Staggered Grid View :

  1. 交错网格视图
  2. Pinterest砌体布局交错网格视图
  1. Staggered Grid View
  2. Pinterest Masonry layout Staggered Grid View

这篇关于Android-Gridlayout和交错Gridlayout之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 01:26