How to limit ListView to particular number of list items in android : I am working on a functionality in which I have a ListView and I want listView to show only 3 items. I have set ListView height to **"wrap_content"** and in adapter I have set **get count** to 3 so that it will show only 3 items but it is showing only 1 item. I am not able to figure out what is happening.

Code : 
              
       public int getCount() {
             return 3;
          }