當前位置: 首頁>>代碼示例>>Java>>正文


Java Filterable類代碼示例

本文整理匯總了Java中android.widget.Filterable的典型用法代碼示例。如果您正苦於以下問題:Java Filterable類的具體用法?Java Filterable怎麽用?Java Filterable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Filterable類屬於android.widget包,在下文中一共展示了Filterable類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onTextChanged

import android.widget.Filterable; //導入依賴的package包/類
private void onTextChanged(CharSequence newText) {
    CharSequence text = mEditText.getText();
    mUserQuery = text;
    if (mAdapter != null && mAdapter instanceof Filterable) {
        ((Filterable) mAdapter).getFilter().filter(text);
    }
    if (mOnQueryChangeListener != null && !TextUtils.equals(newText, mOldQueryText)) {
        dispatchFilters();
        mOnQueryChangeListener.onQueryTextChange(newText.toString());
    }
    mOldQueryText = newText.toString();

    if (!TextUtils.isEmpty(newText)) {
        showClearTextIcon();
    } else {
        hideClearTextIcon();
    }
}
 
開發者ID:sega4revenge,項目名稱:Sega,代碼行數:19,代碼來源:SearchView.java

示例2: HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewListAdapter(ArrayList<FixedViewInfo> headerViewInfos,
		ArrayList<FixedViewInfo> footerViewInfos, ListAdapter adapter) {
	mAdapter = adapter;
	mIsFilterable = adapter instanceof Filterable;

	if (headerViewInfos == null) {
		mHeaderViewInfos = EMPTY_INFO_LIST;
	} else {
		mHeaderViewInfos = headerViewInfos;
	}

	if (footerViewInfos == null) {
		mFooterViewInfos = EMPTY_INFO_LIST;
	} else {
		mFooterViewInfos = footerViewInfos;
	}

	mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos)
			&& areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:junchenChow,項目名稱:exciting-app,代碼行數:21,代碼來源:HeaderViewListAdapter.java

示例3: PLA_HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public PLA_HeaderViewListAdapter(ArrayList<PLA_ListView$FixedViewInfo> headerViewInfos,
                                 ArrayList<PLA_ListView$FixedViewInfo> footerViewInfos,
                                 ListAdapter adapter) {
    this.mAdapter = adapter;
    this.mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        this.mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        this.mHeaderViewInfos = headerViewInfos;
    }
    if (footerViewInfos == null) {
        this.mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        this.mFooterViewInfos = footerViewInfos;
    }
    boolean z = areAllListInfosSelectable(this.mHeaderViewInfos) && areAllListInfosSelectable
            (this.mFooterViewInfos);
    this.mAreAllFixedViewsSelectable = z;
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:20,代碼來源:PLA_HeaderViewListAdapter.java

示例4: PLA_HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public PLA_HeaderViewListAdapter(ArrayList<PLA_ListView.FixedViewInfo> headerViewInfos,
                             ArrayList<PLA_ListView.FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:Shmilyz,項目名稱:Swap,代碼行數:23,代碼來源:PLA_HeaderViewListAdapter.java

示例5: HeaderViewGridAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewGridAdapter(ArrayList<FixedViewInfo> headerViewInfos, ArrayList<FixedViewInfo> footViewInfos, ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footViewInfos;
    }
    mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:LegendKe,項目名稱:MyTravelingDiary,代碼行數:18,代碼來源:GridViewWithHeaderAndFooter.java

示例6: HeaderViewGridAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewGridAdapter(ArrayList<FixedViewInfo> headerViewInfos, ArrayList<FixedViewInfo> footViewInfos, ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footViewInfos;
    }
    mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos)
        && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:joy-inc,項目名稱:joy-library,代碼行數:18,代碼來源:ObservableGridView.java

示例7: setAdapter

import android.widget.Filterable; //導入依賴的package包/類
@Override
public <T extends ListAdapter & Filterable> void setAdapter(T adapter) {
    super.setAdapter(adapter);
    BaseRecipientAdapter baseAdapter = (BaseRecipientAdapter) adapter;
    baseAdapter.registerUpdateObserver(new BaseRecipientAdapter.EntriesUpdatedObserver() {
        @Override
        public void onChanged(List<RecipientEntry> entries) {
            // Scroll the chips field to the top of the screen so
            // that the user can see as many results as possible.
            if (entries != null && entries.size() > 0) {
                scrollBottomIntoView();
            }
        }
    });
    baseAdapter.setDropdownChipLayouter(mDropdownChipLayouter);
}
 
開發者ID:jianliaoim,項目名稱:talk-android,代碼行數:17,代碼來源:RecipientEditTextView.java

示例8: PLAHeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public PLAHeaderViewListAdapter(ArrayList<PLAListView.FixedViewInfo> headerViewInfos,
                                ArrayList<PLAListView.FixedViewInfo> footerViewInfos,
                                ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:Dreamer206602,項目名稱:SimplifyReader2,代碼行數:23,代碼來源:PLAHeaderViewListAdapter.java

示例9: HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewListAdapter(ArrayList<FixedViewInfo> headerViewInfos,
                             ArrayList<FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
            && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:cheyiliu,項目名稱:test4XXX,代碼行數:23,代碼來源:HeaderViewListAdapter.java

示例10: HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewListAdapter(ArrayList<StaggeredGridView.FixedViewInfo> headerViewInfos,
                             ArrayList<StaggeredGridView.FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
                    && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:harichen,項目名稱:PullToRefreshLibrary,代碼行數:23,代碼來源:HeaderViewListAdapter.java

示例11: HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewListAdapter(ArrayList<FixedViewInfo> headerViewInfos, ArrayList<FixedViewInfo> footerViewInfos, ListAdapter adapter) {
	mAdapter = adapter;
	mIsFilterable = adapter instanceof Filterable;

	if (headerViewInfos == null) {
		mHeaderViewInfos = EMPTY_INFO_LIST;
	} else {
		mHeaderViewInfos = headerViewInfos;
	}

	if (footerViewInfos == null) {
		mFooterViewInfos = EMPTY_INFO_LIST;
	} else {
		mFooterViewInfos = footerViewInfos;
	}

	mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos) && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:lingganhezi,項目名稱:dedecmsapp,代碼行數:19,代碼來源:HeaderViewListAdapter.java

示例12: HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewListAdapter(ArrayList<ExtendableListView.FixedViewInfo> headerViewInfos,
                             ArrayList<ExtendableListView.FixedViewInfo> footerViewInfos,
                             ListAdapter adapter) {
    mAdapter = adapter;
    mIsFilterable = adapter instanceof Filterable;

    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }

    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }

    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
                    && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:qbeenslee,項目名稱:Nepenthes-Android,代碼行數:23,代碼來源:HeaderViewListAdapter.java

示例13: HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewListAdapter(ArrayList<StaggeredGridView.FixedViewInfo> headerViewInfos, ArrayList<StaggeredGridView.FixedViewInfo> footerViewInfos, ListAdapter adapter)
{
	mAdapter = adapter;
	mIsFilterable = adapter instanceof Filterable;

	if (headerViewInfos == null)
	{
		mHeaderViewInfos = EMPTY_INFO_LIST;
	}
	else
	{
		mHeaderViewInfos = headerViewInfos;
	}

	if (footerViewInfos == null)
	{
		mFooterViewInfos = EMPTY_INFO_LIST;
	}
	else
	{
		mFooterViewInfos = footerViewInfos;
	}

	mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos) && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:haikuowuya,項目名稱:like_googleplus_layout,代碼行數:26,代碼來源:HeaderViewListAdapter.java

示例14: FilterWidgetSupport

import android.widget.Filterable; //導入依賴的package包/類
public FilterWidgetSupport(MenuItem searchMenuItem, final Filterable filterable) {
    this.searchMenuItem = searchMenuItem;
    searchViewStrategy = (Build.VERSION.SDK_INT >= HONEYCOMB) ? new HoneycombStrategy() : new LegacyStrategy();
    searchViewStrategy.setup(searchMenuItem, new SearchViewStrategy.OnFilterTextListener() {
        public void onFilterTextChange(String newText) {
            Filter filter = filterable.getFilter();
            if (filter != null)
                filter.filter(newText);
        }

        public void onFilterTextSubmit(String query) {
            Log.d(TAG, "onFilterTextSubmit : '"+query+"'");
            clearSearchViewOnSubmit();
        }
    });
}
 
開發者ID:m4rzEE1,項目名稱:ninja_chic-,代碼行數:17,代碼來源:FilterWidgetSupport.java

示例15: HeaderViewListAdapter

import android.widget.Filterable; //導入依賴的package包/類
public HeaderViewListAdapter(List<ViewInfo> headerViewInfos,
                             List<ViewInfo> footerViewInfos, ListAdapter adapter, ListAdapterCallback listener) {
    super(adapter, listener);
    mIsFilterable = adapter instanceof Filterable;
    if (headerViewInfos == null) {
        mHeaderViewInfos = EMPTY_INFO_LIST;
    } else {
        mHeaderViewInfos = headerViewInfos;
    }
    if (footerViewInfos == null) {
        mFooterViewInfos = EMPTY_INFO_LIST;
    } else {
        mFooterViewInfos = footerViewInfos;
    }
    mAreAllFixedViewsSelectable =
            areAllListInfosSelectable(mHeaderViewInfos)
                    && areAllListInfosSelectable(mFooterViewInfos);
}
 
開發者ID:restorer,項目名稱:gloomy-dungeons-2,代碼行數:19,代碼來源:HeaderViewListAdapter.java


注:本文中的android.widget.Filterable類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。