aspose file tools*
The moose likes Android and the fly likes how we can add two different lists with separator between the two???  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "how we can add two different lists with separator between the two???  " Watch "how we can add two different lists with separator between the two???  " New topic
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;
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how we can add two different lists with separator between the two???