Android Open Source - Lists-android List Adapter






From Project

Back to project page Lists-android.

License

The source code is released under:

Apache License

If you think the Android project Lists-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.dropbox.examples.lists;
/*from   w w  w .j av a  2s  .c o  m*/
import android.content.Context;
import com.dropbox.sync.android.DbxDatastoreInfo;

import java.util.List;

// An adapter for lists. Each item is backed by a datastore.
public class ListAdapter extends DeletableItemAdapter<DbxDatastoreInfo> {
    public ListAdapter(List<DbxDatastoreInfo> items, Context ctx) {
        super(items, ctx, true);
    }

    @Override
    protected String getText(int position) {
        DbxDatastoreInfo info = this.getItem(position);
        if (info.title != null) return info.title;
        else return info.id;
    }
}




Java Source Code List

com.dropbox.examples.lists.DeletableItemAdapter.java
com.dropbox.examples.lists.ListActivity.java
com.dropbox.examples.lists.ListAdapter.java
com.dropbox.examples.lists.ListItemAdapter.java
com.dropbox.examples.lists.ListsApplication.java
com.dropbox.examples.lists.MainActivity.java
com.dropbox.examples.lists.OnItemDeletedListener.java
com.dropbox.examples.lists.SharingDialogFragment.java