Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if there is space available in a linear layout

I have linearlayout that with horizontal orientation.

I am adding ImageView item in it with inflating ImageViews. How can I check if there is no more space in the linear layout ?

For example in small screens I will add only 5 items but on big screens I will add up to 8. (depending of the size of the screen)

like image 595
Lukap Avatar asked Nov 04 '22 00:11

Lukap


1 Answers

You can maybe take a look at this example.

http://hzqtc.github.io/2013/12/android-custom-layout-flowlayout.html

like image 145
Christopher Lamont Avatar answered Nov 08 '22 05:11

Christopher Lamont