관리 메뉴

IT 컴퓨터공학 자료실

GridView 와 GridLayout의 차이(Differance) 본문

컴퓨터공학/안드로이드

GridView 와 GridLayout의 차이(Differance)

윤맨1 2016. 1. 12. 02:39

GridView is a ViewGroup that displays items in two-dimensional scrolling grid. The items in the grid come from the ListAdapter associated with this view.

GridView는 스크롤하는 이차원적인 그리드 안에서 표시되는 ViewGroup입니다. GridView는 ListAdapter와 연관되어 Item을 불러옵니다.

This is what you'd want to use (keep using). Because a GridView gets its data from a ListAdapter, the only data loaded in memory will be the one displayed on screen. GridViews, much like ListViews reuse and recycle their views for better performance.

이것은 당신이 사용하기 원하는 그것입니다. 왜냐하면 GridView는 ListAdapter로부터 데이터를 가져와, 스크린 안에서 오직 메모리 안에 불러온 데이터만 표시합니다. GridView는 ListView같은 다른 View들보다 재사용성이 높아 퍼포먼스가 좋습니다.


Whereas a GridLayout is a layout that places its children in a rectangular grid.

반면 GridLayout은 사각형 그리드 안에서의 자식 레이아웃이다.

It was introduced in API level 14, and was recently backported in the Support Library. Its main purpose is to solve alignment and performance problems in other layouts. Check out this tutorial if you want to learn more about GridLayout.

이것은 API 레벨 14에서 소개되었는데, 서포트 라이브러리 안에 포함되어 있다. 다른 레이아웃들 안에서 퍼포먼스와 정렬 문제를 해결하기 위함을 주 목적으로 하고 있다. 이 튜토리얼을 통해 GridLayout에 대해 더 배울 수 있다.


출처 : http://stackoverflow.com/questions/11307218/gridview-vs-gridlayout-in-android-apps