Available Methods
- setAdapter ( )
- setOnItemClickListener ( )
- INVALID_POSITION
- setLayoutParams ( )
- getCheckedItemPosition ( )
- getAdapter ( )
- getItemAtPosition ( )
- setDivider ( )
- setEmptyView ( )
- getFirstVisiblePosition ( )
- setId ( )
- addHeaderView ( )
- setChoiceMode ( )
- getLayoutParams ( )
- setOnItemLongClickListener ( )
- getChildAt ( )
- setOnScrollListener ( )
- setItemChecked ( )
- getDividerHeight ( )
- setSelection ( )
- getChildCount ( )
- setSelector ( )
- addFooterView ( )
- setDividerHeight ( )
- getCount ( )
- setCacheColorHint ( )
- setPadding ( )
- getLastVisiblePosition ( )
- setVisibility ( )
- setVerticalScrollBarEnabled ( )
- setItemsCanFocus ( )
- setScrollBarStyle ( )
- post ( )
- setFastScrollEnabled ( )
- setSelectionFromTop ( )
- setBackgroundColor ( )
- requestLayout ( )
- setFadingEdgeLength ( )
- setDrawSelectorOnTop ( )
- setClickable ( )
- setMultiChoiceModeListener ( )
- LayoutParams ( )
- CHOICE_MODE_NONE
- setOnTouchListener ( )
- getPaddingBottom ( )
- getHeight ( )
- setTranscriptMode ( )
- getPositionForView ( )
- setOnCreateContextMenuListener ( )
- setFooterDividersEnabled ( )
- isItemChecked ( )
- getVisibility ( )
- getParent ( )
- CHOICE_MODE_MULTIPLE_MODAL
- getPaddingTop ( )
- getDivider ( )
- setStackFromBottom ( )
- setVerticalFadingEdgeEnabled ( )
- getCheckedItemPositions ( )
- setOverScrollMode ( )
- CHOICE_MODE_SINGLE
- setDrawingCacheEnabled ( )
- getWidth ( )
- smoothScrollToPosition ( )
- setClipToPadding ( )
- setRecyclerListener ( )
- setTag ( )
- setScrollbarFadingEnabled ( )
- getLocationOnScreen ( )
- getContext ( )
- getId ( )
- postDelayed ( )
Related Classes
- java.io.File
- java.util.Collections
- android.os.Bundle
- android.content.Context
- android.view.View
- android.util.Log
- android.widget.TextView
- android.content.Intent
- android.view.ViewGroup
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.widget.ImageView
- android.graphics.Color
- android.os.Handler
- android.net.Uri
- android.widget.Button
- android.text.TextUtils
- android.view.MotionEvent
- android.widget.LinearLayout
- android.support.annotation.Nullable
- android.widget.EditText
- android.content.SharedPreferences
- android.support.annotation.NonNull
Java Code Examples for android.widget.listview#postDelayed()
The following examples show how to use
android.widget.listview#postDelayed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CountryListSpinner.java From FirebaseUI-Android with Apache License 2.0 | 6 votes |
public void show(final int selected) { if (listAdapter == null) { return; } final AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); dialog = builder.setSingleChoiceItems(listAdapter, 0, this).create(); dialog.setCanceledOnTouchOutside(true); final ListView listView = dialog.getListView(); listView.setFastScrollEnabled(true); listView.setScrollbarFadingEnabled(false); listView.postDelayed(new Runnable() { @Override public void run() { listView.setSelection(selected); } }, DELAY_MILLIS); dialog.show(); }
Example 2
Source File: AbstractViewQuery.java From COCOQuery with Apache License 2.0 | 6 votes |
public T smoothScrollTo(final int position) { if (view instanceof ListView) { final ListView listView = (ListView) view; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { listView.smoothScrollToPositionFromTop(position, 0); listView.postDelayed(new Runnable() { @Override public void run() { // Mock touchEvent to stop listView Scrolling. listView.onTouchEvent(MotionEvent.obtain(System.currentTimeMillis(), System.currentTimeMillis(), MotionEvent.ACTION_DOWN, 0, 0, 0)); } }, 150 - 20); listView.postDelayed(new Runnable() { @Override public void run() { listView.setSelectionFromTop(position, 0); } }, 150); } else { listView.setSelectionFromTop(position, 0); } } return self(); }
Example 3
Source File: ListViewUtils.java From Qshp with MIT License | 5 votes |
/** * 滚动列表到顶端 * * @param listView */ public static void smoothScrollListViewToTop(final ListView listView) { if (listView == null) { return; } smoothScrollListView(listView, 0); listView.postDelayed(new Runnable() { @Override public void run() { listView.setSelection(0); } }, 200); }