staggeredgridlayout

Android - Difference between Gridlayout and Staggered Gridlayout

隐身守侯 提交于 2019-11-27 10:17:38
问题 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. 回答1: 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. Staggered Grid View : It is

StaggeredGridLayoutManager and moving items

人盡茶涼 提交于 2019-11-26 15:32:34
问题 I have created a very simple project, displaying 28 images with StaggeredGridLayoutManager by recyclerview. but as I scroll the recyclerview it moves items for example from left to right or swap the column of left and right. codes: import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.os.Bundle; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; public class MainActivity extends Activity { String