Answer the question
In order to leave comments, you need to log in
How to stretch ListView to full screen?
Good afternoon!
There is a simple layout: text fields at the top and bottom of the screen and a listview between them. It has several elements and on a large screen this view takes up half the screen. How can I stretch it to the entire space between the text fields? In the sense that the size of list items would become larger
Answer the question
In order to leave comments, you need to log in
If you only have a few items, then replace the ListView with a LineralLayout and give all children the same weight, as in Copperfield 's answer .
ListView does not know how to stretch its child elements.
Custom adapter for ListView, which in the getView method will set View parameters depending on the content and the number of items in the list.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question