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
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how we can add two different lists with separator between the two???
 
Similar Threads
How to display Images stored on sdcard?
How to add text to gridview
listview with checkbox problem
How to Create two parallel listViews where each list view contains a text and a icon
styling items of a ListView