android listview display all available items without scroll with static header

The solution I used is to replace ListView with LinearLayout. You can create all your items inside LinearLayout, they will all be displayed. So there’s really no need to use ListView.

LinearLayout list = (LinearLayout)findViewById(;
for (int i=0; i<products.size(); i++) {
  Product product = products.get(i);
  View vi = inflater.inflate(R.layout.product_item, null);

Leave a Comment