Good day all, have a small issue here. I have an EditText and a ListView inside a RelativeLayout. The ListView is populated by items in a string-array using an ArrayAdapter. The size of thr array is 5 and the ListView Items is a Table Layout with table row Layout Parameters set to both Fill_Parent same as the ListView Widget. Now I want the Listview Items to fill up and occupy the remaining screen space. but since they are only few Items, it behaves like it's using wrap_content. Any Idea how to stretch out this ListView Items? Thanks in Advance.
Asked
Active
Viewed 942 times
1 Answers
0
Try this out:
<ListView
android:id="@+id/yourListView"
android:layout_width="fill_parent"
android:layout_height="match_parent">
</ListView>

Ankit Dhadse
- 1,566
- 1
- 15
- 19
-
fill_parent and match_parent provide the same behavior, mainly that the view will "fill" or "match" the space occupied by its parent view. Having said that, fill_parent is deprecated, so it would be better to set both the width and height attributes to "match_parent" – GrimmRanger Sep 25 '13 at 16:34