Welcome, guest! Login / Register - Why register?
[ Pastes: 81335 ] [ Members: 2139 ]

Paste

Short URL: http://goo.gl/bqz9P
Pasted as Plain Text by ttt on Monday, April 9th, 2012 10:33pm ( 4 years ago )
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{

[email protected]
public int getCount() {
// TODO Auto-generated method stub
return i;
}

[email protected]
public Object getItem(int position) {
// TODO Auto-generated method stub
return null;
}

[email protected]
public long getItemId(int position) {
// TODO Auto-generated method stub
return 0;
}

[email protected]
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

 

Revise this Paste

Children: 54314
Your Name:
Code Language:

To minimise the influx of spam: you are required to register to post any code.