Use BaseAdapter instead of Array Adapter. you will get getCount method when you extend the unimplemented methods... your logic is same..

Initially i=10

BaseAdapter structure:
class NamesAdapter extends BaseAdapter{

//@Override
public int getCount() {
// TODO Auto-generated method stub
return i;
}

//@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return null;
}

//@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return 0;
}

//@Override
public View getView(int pos, View convertView, ViewGroup parent) {
//Your getview logic here
return row;
}
 
}


And place a button in your xml "Show More".. i have said in my answer for onclick of that button .. do that

Add a code snippet to your website: www.paste.org