| Author |
how we can add two different lists with separator between the two???
|
neelima kant
Greenhorn
Joined: Sep 17, 2010
Posts: 20
|
|
private class MyListAdapter extends BaseAdapter {
public MyListAdapter(Context context) {
mContext = context;
}
public int getCount() {
return mStrings.length;
}
@Override
public boolean areAllItemsEnabled() {
return false;
}
@Override
public boolean isEnabled(int position) {
return !mStrings[position].startsWith("-");
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
TextView tv;
if (convertView == null) {
tv = (TextView) LayoutInflater.from(mContext).inflate(
android.R.layout.simple_expandable_list_item_1, parent, false);
} else {
tv = (TextView) convertView;
}
tv.setText(mStrings[position]);
return tv;
}
private Context mContext;
}
|
 |
 |
|
|
subject: how we can add two different lists with separator between the two???
|
|
|