use of android.widget.Adapter in project KJFrameForAndroid by kymjs.
the class PullToRefreshList method isFirstItemVisible.
/**
* 判断第一个child是否完全显示出来
*
* @return true完全显示出来,否则false
*/
private boolean isFirstItemVisible() {
final Adapter adapter = mfakeListView.getAdapter();
if (null == adapter || adapter.isEmpty()) {
return true;
}
int mostTop = (mfakeListView.getChildCount() > 0) ? mfakeListView.getChildAt(0).getTop() : mfakeListView.getTop();
if (mostTop >= 0) {
return true;
}
return false;
}
use of android.widget.Adapter in project KeepScore by nolanlawson.
the class CustomFastScrollView method getSections.
private void getSections() {
Adapter adapter = mList.getAdapter();
if (adapter instanceof HeaderViewListAdapter) {
mListOffset = ((HeaderViewListAdapter) adapter).getHeadersCount();
adapter = ((HeaderViewListAdapter) adapter).getWrappedAdapter();
}
if (adapter instanceof SectionIndexer) {
mListAdapter = (BaseAdapter) adapter;
mSections = ((SectionIndexer) mListAdapter).getSections();
}
}
use of android.widget.Adapter in project SuperSaiyanScrollView by nolanlawson.
the class SuperSaiyanScrollView method getSections.
private void getSections() {
Adapter adapter = mList.getAdapter();
if (adapter instanceof HeaderViewListAdapter) {
mListOffset = ((HeaderViewListAdapter) adapter).getHeadersCount();
adapter = ((HeaderViewListAdapter) adapter).getWrappedAdapter();
}
if (adapter instanceof SectionIndexer) {
mListAdapter = (BaseAdapter) adapter;
mSections = ((SectionIndexer) mListAdapter).getSections();
}
}
use of android.widget.Adapter in project androidquery by androidquery.
the class AbstractAQuery method dataChanged.
/**
* Notify a ListView that the data of it's adapter is changed.
*
* @return self
*/
public T dataChanged() {
if (view instanceof AdapterView) {
AdapterView<?> av = (AdapterView<?>) view;
Adapter a = av.getAdapter();
if (a instanceof BaseAdapter) {
BaseAdapter ba = (BaseAdapter) a;
ba.notifyDataSetChanged();
}
}
return self();
}
use of android.widget.Adapter in project assertj-android by square.
the class AbstractAdapterViewAssert method hasAdapter.
public S hasAdapter(Adapter adapter) {
isNotNull();
Adapter actualAdapter = actual.getAdapter();
//
assertThat(actualAdapter).overridingErrorMessage("Expected adapter <%s> but was <%s>.", adapter, //
actualAdapter).isSameAs(adapter);
return myself;
}
Aggregations