For my app I want to enable a thing looking somehow like this:
in Layaout set Parameter
And in the Coding Part Set the Dynamic height of listview according to device height
LayoutParams lp = (LayoutParams) list1.getLayoutParams();
int height = (arraylist.size()) * 80;
//arraylist list is in which all data is kept
lp.height = height;
listview.setLayoutParams(lp);
listview.setAdapter(Adapter);