i have this ListView inside a LinearLayout:
You shouldn't use wrap_content
for the height of a ListView
. wrap_content
means "make me as large as needed to hold all of my children." When you consider that your data set could be potentially very large, that should sound like a pretty bad idea.
Since you are using a LinearLayout, give your ListView layout_height="0dp"
and layout_weight="1"
.
It's okay to let the ListView
take the remainder of the screen. If it only has one row, it will show one row, no big deal. Unless you are trying to show something below the list, but what I've told you above should accomplish that.
If above doesn't work, you can just use RelativeLayout
instead of linear and put the ListView
underneath the EditText
.