Horizontal scrolling of lists of grids?

There are many questions about horizontally scrolling GridViews. Some have answers that lead to some custom classes that do this, but Google clearly points out a standard way to do this. They have a whole page about this in the Design section: Grid Lists . This page shows horizontal scroll grids and it is strictly indicated that this is normal, supported behavior (as it should be). They talk in detail about how to use it. Unfortunately, they neglect to mention HOW to do this. I searched all day to find an example of how this is achieved using GridView or any other standard Android UI, regardless of the SDK version. Are their documentation wrong? What does this page link to?

+4
source share
2 answers

while Google clearly points out a standard way to do this

No, they do not.

They have a whole page about this in the Design section: Grid Lists.

They have material in the "Design" section, for which the Android SDK does not have a ready-made implementation. Other examples include a box , some of the gestures , and section headings in lists .

Is their documentation wrong?

This is the design documentation. In this case, it is not β€œwrong” to have a design that requires horizontal scrolling of the GridView . The mere fact that the Android SDK does not provide one thing - at least at the time of this writing - does not prevent someone from creating it.

What does this page link to?

Grid.

+2
source

try xml with the following:

 <HorizontalScrollView android:layout_width="wrap_content" android:layout_height="wrap_content"> <GridView //your layout > </GridView> </HorizontalScrollView> 
0
source

Source: https://habr.com/ru/post/1438751/


All Articles