Search in sources :

Example 6 with Adapter

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;
}
Also used : Adapter(android.widget.Adapter)

Example 7 with Adapter

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();
    }
}
Also used : HeaderViewListAdapter(android.widget.HeaderViewListAdapter) Adapter(android.widget.Adapter) HeaderViewListAdapter(android.widget.HeaderViewListAdapter) BaseAdapter(android.widget.BaseAdapter) SectionIndexer(android.widget.SectionIndexer)

Example 8 with Adapter

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();
    }
}
Also used : HeaderViewListAdapter(android.widget.HeaderViewListAdapter) Adapter(android.widget.Adapter) HeaderViewListAdapter(android.widget.HeaderViewListAdapter) BaseAdapter(android.widget.BaseAdapter) SectionIndexer(android.widget.SectionIndexer)

Example 9 with Adapter

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();
}
Also used : AdapterView(android.widget.AdapterView) BaseAdapter(android.widget.BaseAdapter) Adapter(android.widget.Adapter) ExpandableListAdapter(android.widget.ExpandableListAdapter) BaseAdapter(android.widget.BaseAdapter)

Example 10 with Adapter

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;
}
Also used : Adapter(android.widget.Adapter)

Aggregations

Adapter (android.widget.Adapter)36 AdapterView (android.widget.AdapterView)23 View (android.view.View)18 BaseAdapter (android.widget.BaseAdapter)15 ListAdapter (android.widget.ListAdapter)12 AbsListView (android.widget.AbsListView)10 RemoteAdapterConnectionCallback (android.widget.RemoteViewsAdapter.RemoteAdapterConnectionCallback)7 TextView (android.widget.TextView)7 Intent (android.content.Intent)4 ExpandableListAdapter (android.widget.ExpandableListAdapter)4 HeaderViewListAdapter (android.widget.HeaderViewListAdapter)3 SuppressLint (android.annotation.SuppressLint)2 ExpandableListView (android.widget.ExpandableListView)2 SectionIndexer (android.widget.SectionIndexer)2 DataSetObserver (android.database.DataSetObserver)1 FragmentPagerAdapter (android.support.v4.app.FragmentPagerAdapter)1 CursorAdapter (android.support.v4.widget.CursorAdapter)1 ViewGroup (android.view.ViewGroup)1 ArrayAdapter (android.widget.ArrayAdapter)1 ListView (android.widget.ListView)1