Welcome, guest! Login / Register - Why register?

Paste

Short URL: http://goo.gl/bqz9P
Pasted as Plain Text by ttt ( 6 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{

//@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

 

Revise this Paste

Children: 54314
Your Name:
Code Language: