Lukap
Lukap

Reputation: 31963

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)

Upvotes: 5

Views: 1115

Answers (1)

Christopher Lamont
Christopher Lamont

Reputation: 31

You can maybe take a look at this example.

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

Upvotes: 2

Related Questions