本文整理了Java中android.widget.ListView.setFastScrollEnabled()
方法的一些代码示例,展示了ListView.setFastScrollEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setFastScrollEnabled()
方法的具体详情如下:
包路径:android.widget.ListView
类名称:ListView
方法名:setFastScrollEnabled
暂无
代码示例来源:origin: stackoverflow.com
myListView.setFastScrollEnabled(true);
MyAZAdapter<String> adapter = new MyAZAdapter<String>(
getApplicationContext(), android.R.layout.simple_list_item_1,
代码示例来源:origin: k9mail/k-9
private void initializeLayout() {
listView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
listView.setLongClickable(true);
listView.setFastScrollEnabled(true);
listView.setScrollingCacheEnabled(false);
listView.setOnItemClickListener(this);
registerForContextMenu(listView);
}
代码示例来源:origin: smuyyh/BookReader
@OnClick(R.id.toolbar_menu)
public void showMenu() {
if (!mTocListPopupWindow.isShowing()) {
mTocListPopupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
mTocListPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mTocListPopupWindow.show();
mTocListPopupWindow.setSelection(currentChapter - 1);
mTocListPopupWindow.getListView().setFastScrollEnabled(true);
}
}
代码示例来源:origin: beworker/pinned-section-listview
@SuppressLint("NewApi")
private void initializeAdapter() {
getListView().setFastScrollEnabled(isFastScroll);
if (isFastScroll) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
getListView().setFastScrollAlwaysVisible(true);
}
setListAdapter(new FastScrollAdapter(this, android.R.layout.simple_list_item_1, android.R.id.text1));
} else {
setListAdapter(new SimpleAdapter(this, android.R.layout.simple_list_item_1, android.R.id.text1));
}
}
代码示例来源:origin: smuyyh/BookReader
@OnClick(R.id.tvBookReadToc)
public void onClickToc() {
gone(rlReadAaSet, rlReadMark);
if (!mTocListPopupWindow.isShowing()) {
visible(mTvBookReadTocTitle);
gone(mTvBookReadReading, mTvBookReadCommunity, mTvBookReadChangeSource);
mTocListPopupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
mTocListPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mTocListPopupWindow.show();
mTocListPopupWindow.setSelection(currentChapter - 1);
mTocListPopupWindow.getListView().setFastScrollEnabled(true);
}
}
代码示例来源:origin: k9mail/k-9
setLayout(R.layout.list_content_simple);
getListView().setFastScrollEnabled(true);
getListView().setItemsCanFocus(false);
getListView().setChoiceMode(ListView.CHOICE_MODE_NONE);
代码示例来源:origin: k9mail/k-9
listView = getListView();
listView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
listView.setFastScrollEnabled(true);
listView.setScrollingCacheEnabled(false);
listView.setOnItemClickListener(new OnItemClickListener() {
代码示例来源:origin: jaredrummler/AndroidProcesses
@Override public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
getListView().setFastScrollEnabled(true);
new AndroidAppProcessLoader(getActivity(), this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
代码示例来源:origin: stackoverflow.com
CurAdapter Cur = new CurAdapter(getActivity(), mCur,0);
final ListView lv = (ListView)findViewById(R.id.listAccommodation);
lv.setFastScrollEnabled(true);
lv.setAdapter(Cur);
代码示例来源:origin: rajeeviiit/AndroidProject
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
adapter = new SelectUserAdapter(selectUsers, MainActivity.this);
listView.setAdapter(adapter);
// Select item on listclick
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
Log.e("search", "here---------------- listener");
SelectUser data = selectUsers.get(i);
}
});
listView.setFastScrollEnabled(true);
}
}
代码示例来源:origin: andforce/iBeebo
@Override
public void onResume() {
super.onResume();
getListView().setFastScrollEnabled(SettingUtils.allowFastScroll());
}
代码示例来源:origin: andforce/iBeebo
@Override
public void onResume() {
super.onResume();
getListView().setFastScrollEnabled(SettingUtils.allowFastScroll());
}
代码示例来源:origin: Coinomi/coinomi-android
@Override
public void onViewCreated(final View view, final Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
getListView().setFastScrollEnabled(true);
setEmptyText(getString(R.string.exchange_rates_loading));
}
代码示例来源:origin: openwalletGH/openwallet-android
@Override
public void onViewCreated(final View view, final Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
getListView().setFastScrollEnabled(true);
setEmptyText(getString(R.string.exchange_rates_loading));
}
代码示例来源:origin: AndBible/and-bible
/** Called when the activity is first created. */
@SuppressLint("MissingSuperCall")
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState, true);
Log.i(TAG, "Displaying General Book Key chooser");
setContentView(R.layout.list);
buildActivityComponent().inject(this);
prepareList();
adapter = new DailyReadingItemAdapter(this, android.R.layout.simple_list_item_2, readingsList);
setListAdapter(adapter);
getListView().setFastScrollEnabled(true);
Log.d(TAG, "Finished displaying Search view");
}
代码示例来源:origin: geniusgithub/AndroidDialer
private void configureVerticalScrollbar() {
boolean hasScrollbar = isVisibleScrollbarEnabled() && isSectionHeaderDisplayEnabled();
if (mListView != null) {
mListView.setFastScrollEnabled(hasScrollbar);
mListView.setFastScrollAlwaysVisible(hasScrollbar);
mListView.setVerticalScrollbarPosition(mVerticalScrollbarPosition);
mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
}
}
代码示例来源:origin: ybonnel/TransportsRennes
private void constructionListe() {
List<Ligne> lignes = TransportsBordeauxApplication.getDataBaseHelper().select(new Ligne(), "ordre");
setListAdapter(new LigneAdapter(this, lignes));
ListView lv = getListView();
lv.setFastScrollEnabled(true);
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Ligne ligne = (Ligne) adapterView.getItemAtPosition(position);
setupShortcut(ligne);
finish();
}
});
}
代码示例来源:origin: ybonnel/TransportsRennes
private void constructionListe() {
List<Ligne> lignes = TransportsRennesApplication.getDataBaseHelper().select(new Ligne(), "ordre");
setListAdapter(new LigneAdapter(this, lignes));
ListView lv = getListView();
lv.setFastScrollEnabled(true);
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Ligne ligne = (Ligne) adapterView.getItemAtPosition(position);
setupShortcut(ligne);
finish();
}
});
}
代码示例来源:origin: ybonnel/TransportsRennes
private void constructionListe() {
List<Ligne> lignes = TransportsRennesApplication.getDataBaseHelper().select(new Ligne(), "ordre");
setListAdapter(new LigneAdapter(this, lignes));
ListView lv = getListView();
lv.setFastScrollEnabled(true);
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Serializable ligne = (Serializable) adapterView.getItemAtPosition(position);
Intent intent = new Intent(BusRennes.this, ListArret.class);
intent.putExtra("ligne", ligne);
startActivity(intent);
}
});
}
代码示例来源:origin: ybonnel/TransportsRennes
private void constructionListe() {
List<Ligne> lignes = TransportsBordeauxApplication.getDataBaseHelper().select(new Ligne(), "ordre");
setListAdapter(new LigneAdapter(this, lignes));
ListView lv = getListView();
lv.setFastScrollEnabled(true);
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Serializable ligne = (Serializable) adapterView.getItemAtPosition(position);
Intent intent = new Intent(ListeBus.this, ListArret.class);
intent.putExtra("ligne", ligne);
startActivity(intent);
}
});
}
内容来源于网络,如有侵权,请联系作者删除!