本文整理匯總了Java中se.emilsjolander.stickylistheaders.StickyListHeadersAdapter類的典型用法代碼示例。如果您正苦於以下問題:Java StickyListHeadersAdapter類的具體用法?Java StickyListHeadersAdapter怎麽用?Java StickyListHeadersAdapter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StickyListHeadersAdapter類屬於se.emilsjolander.stickylistheaders包,在下文中一共展示了StickyListHeadersAdapter類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onLoadFinished
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter; //導入依賴的package包/類
@Override
protected void onLoadFinished(Optional<List<RoomFinderRoom>> result) {
showLoadingEnded();
if (!result.isPresent()) {
if (NetUtils.isConnected(this)) {
showErrorLayout();
} else {
showNoInternetLayout();
}
return;
}
facilities = result.get();
StickyListHeadersAdapter adapter = new RoomFinderListAdapter(this, facilities);
stickyList.setAdapter(adapter);
stickyList.setOnItemClickListener(this);
}
示例2: StickyListHeadersAdapterDecorator
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter; //導入依賴的package包/類
/**
* Create a new {@code StickyListHeadersAdapterDecorator}, decorating given {@link android.widget.BaseAdapter}.
*
* @param baseAdapter the {@code BaseAdapter} to decorate. If this is a {@code BaseAdapterDecorator}, it should wrap an instance of
* {@link se.emilsjolander.stickylistheaders.StickyListHeadersAdapter}.
*/
public StickyListHeadersAdapterDecorator(@NonNull final BaseAdapter baseAdapter) {
super(baseAdapter);
BaseAdapter adapter = baseAdapter;
while (adapter instanceof BaseAdapterDecorator) {
adapter = ((BaseAdapterDecorator) adapter).getDecoratedBaseAdapter();
}
if (!(adapter instanceof StickyListHeadersAdapter)) {
throw new IllegalArgumentException(adapter.getClass().getCanonicalName() + " does not implement StickyListHeadersAdapter");
}
mStickyListHeadersAdapter = (StickyListHeadersAdapter) adapter;
}
示例3: setAdapter
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter; //導入依賴的package包/類
/**
* Set the adapter. You can provide a {@link CardArrayAdapter}, or a {@link it.gmariotti.cardslib.library.internal.CardCursorAdapter}
* or a generic adapter.
* Pay attention: your generic adapter has to call {@link CardArrayAdapter#getView} method
*
* @param adapter
*/
@Override
public void setAdapter(StickyListHeadersAdapter adapter) {
if (adapter instanceof StickyCardArrayAdapter) {
setAdapter((StickyCardArrayAdapter) adapter);
} else {
Log.e(TAG, "You are using a generic adapter. Pay attention: your adapter has to call cardArrayAdapter#getView method");
super.setAdapter(adapter);
}
}
示例4: setAdapter
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter; //導入依賴的package包/類
@Override
public void setAdapter(StickyListHeadersAdapter adapter) {
super.setAdapter(adapter);
if (mScroller != null)
mScroller.setAdapter(adapter);
}