diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-01-02 21:10:08 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-01-02 21:10:08 +0100 |
commit | f5da63f9882e1807c6bd2adb5205ad7482c45339 (patch) | |
tree | 95b034a7a80d2e3ea8343440d617db993f4fca59 /libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersAdapter.java | |
parent | 1d91804dc7943e7149d02141a46c3eb0763e2b94 (diff) | |
download | open-keychain-f5da63f9882e1807c6bd2adb5205ad7482c45339.tar.gz open-keychain-f5da63f9882e1807c6bd2adb5205ad7482c45339.tar.bz2 open-keychain-f5da63f9882e1807c6bd2adb5205ad7482c45339.zip |
New list with sticky list headers library
Diffstat (limited to 'libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersAdapter.java')
-rw-r--r-- | libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersAdapter.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersAdapter.java b/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersAdapter.java new file mode 100644 index 000000000..8b80b71f1 --- /dev/null +++ b/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/StickyListHeadersAdapter.java @@ -0,0 +1,38 @@ +package se.emilsjolander.stickylistheaders; + +import android.view.View; +import android.view.ViewGroup; +import android.widget.ListAdapter; + +public interface StickyListHeadersAdapter extends ListAdapter { + /** + * Get a View that displays the header data at the specified position in the + * set. You can either create a View manually or inflate it from an XML layout + * file. + * + * @param position + * The position of the item within the adapter's data set of the item whose + * header view we want. + * @param convertView + * The old view to reuse, if possible. Note: You should check that this view is + * non-null and of an appropriate type before using. If it is not possible to + * convert this view to display the correct data, this method can create a new + * view. + * @param parent + * The parent that this view will eventually be attached to. + * @return + * A View corresponding to the data at the specified position. + */ + View getHeaderView(int position, View convertView, ViewGroup parent); + + /** + * Get the header id associated with the specified position in the list. + * + * @param position + * The position of the item within the adapter's data set whose header id we + * want. + * @return + * The id of the header at the specified position. + */ + long getHeaderId(int position); +} |