Lines Matching refs:position

250      * and the value holds the last known position in the adapter for that id.
295 * The current position of the selector in the list.
358 * The position of the view that received the down motion event
437 * Optional callback to notify client when scroll position has changed
452 * Indicates whether to use pixels-based or position-based scrollbar
473 * The position to resurrect the selected position to.
491 * find a checked item with a stable ID that moved position across
629 * the top of the first position in the adapter, based on the last time
636 * the bottom of the last position in the adapter, based on the last time
882 * Returns the checked state of the specified position. The result is only
886 * @param position The item whose checked state to return
892 public boolean isItemChecked(int position) {
894 return mCheckStates.get(position);
904 * @return The position of the currently checked item or
922 * get(int position) where position is a position in the list,
971 * Sets the checked state of the specified position. The is only valid if
975 * @param position The item whose checked state is to be checked
978 public void setItemChecked(int position, boolean value) {
995 boolean oldValue = mCheckStates.get(position);
996 mCheckStates.put(position, value);
999 mCheckedIdStates.put(mAdapter.getItemId(position), position);
1001 mCheckedIdStates.delete(mAdapter.getItemId(position));
1012 final long id = mAdapter.getItemId(position);
1014 position, id, value);
1020 if (value || isItemChecked(position)) {
1029 mCheckStates.put(position, true);
1031 mCheckedIdStates.put(mAdapter.getItemId(position), position);
1048 public boolean performItemClick(View view, int position, long id) {
1058 boolean checked = !mCheckStates.get(position, false);
1059 mCheckStates.put(position, checked);
1062 mCheckedIdStates.put(mAdapter.getItemId(position), position);
1064 mCheckedIdStates.delete(mAdapter.getItemId(position));
1074 position, id, checked);
1079 boolean checked = !mCheckStates.get(position, false);
1082 mCheckStates.put(position, true);
1085 mCheckedIdStates.put(mAdapter.getItemId(position), position);
1100 handled |= super.performItemClick(view, position, id);
1118 final int position = firstPos + i;
1121 ((Checkable) child).setChecked(mCheckStates.get(position));
1123 child.setActivated(mCheckStates.get(position));
1272 public void setVerticalScrollbarPosition(int position) {
1273 super.setVerticalScrollbarPosition(position);
1275 mFastScroller.setScrollbarPosition(position);
1289 * When smooth scrollbar is enabled, the position and size of the scrollbar thumb
1296 * When smooth scrollbar is disabled, the position and size of the scrollbar thumb
1297 * is based solely on the number of items in the adapter and the position of the
1525 int position;
1548 position = in.readInt();
1571 out.writeInt(position);
1592 + " position=" + position
1629 ss.position = mPendingSync.position;
1647 ss.position = getSelectedItemPosition();
1651 // Remember the position of the first child.
1656 // ask for any information about position 0 we will crash.
1666 ss.position = firstPos;
1671 ss.position = 0;
1721 mSyncPosition = ss.position;
1732 mSyncPosition = ss.position;
2120 * position. This is called when we have already discovered that the view is
2124 * @param position The position to display
2128 * @return A view displaying the data associated with the specified position
2130 View obtainView(int position, boolean[] isScrap) {
2134 scrapView = mRecycler.getTransientStateView(position);
2139 scrapView = mRecycler.getScrapView(position);
2143 child = mAdapter.getView(position, scrapView, this);
2150 mRecycler.addScrapView(scrapView, position);
2159 child = mAdapter.getView(position, null, this);
2180 lp.itemId = mAdapter.getItemId(position);
2201 final int position = getPositionForView(host);
2204 if ((position == INVALID_POSITION) || (adapter == null)) {
2208 if (!isEnabled() || !adapter.isEnabled(position)) {
2212 if (position == getSelectedItemPosition()) {
2237 final int position = getPositionForView(host);
2240 if ((position == INVALID_POSITION) || (adapter == null)) {
2245 if (!isEnabled() || !adapter.isEnabled(position)) {
2250 final long id = getItemIdAtPosition(position);
2254 if (getSelectedItemPosition() == position) {
2260 if (getSelectedItemPosition() != position) {
2261 setSelection(position);
2267 return performItemClick(host, position, id);
2272 return performLongPress(host, position, id);
2281 void positionSelector(int position, View sel) {
2282 if (position != INVALID_POSITION) {
2283 mSelectorPosition = position;
2702 * methods knows the view, position and ID of the item that received the
2706 * @param position The position of the item that received the long press.
2711 ContextMenuInfo createContextMenuInfo(View view, int position, long id) {
2712 return new AdapterContextMenuInfo(view, position, id);
2836 final int position = pointToPosition((int)x, (int)y);
2837 if (position != INVALID_POSITION) {
2838 final long id = mAdapter.getItemId(position);
2839 View child = getChildAt(position - mFirstPosition);
2841 mContextMenuInfo = createContextMenuInfo(child, position, id);
2908 * Maps a point to a position in the list.
2912 * @return The position of the item which contains the specified point, or
2945 int position = pointToPosition(x, y);
2946 if (position >= 0) {
2947 return mAdapter.getItemId(position);
3073 // If we don't have a motion position that we can reliably track,
4179 void start(final int position) {
4186 start(position);
4202 int clampedPosition = Math.max(0, Math.min(getCount() - 1, position));
4226 void start(final int position, final int boundPosition) {
4230 start(position);
4238 start(position, boundPosition);
4254 int clampedPosition = Math.max(0, Math.min(getCount() - 1, position));
4258 // Moving would shift our bound position off the screen. Abort.
4274 // Moving would shift our bound position off the screen. Abort.
4304 void startWithOffset(int position, int offset) {
4305 startWithOffset(position, offset, SCROLL_DURATION);
4308 void startWithOffset(final int position, int offset, final int duration) {
4316 startWithOffset(position, postOffset, duration);
4330 mTargetPos = Math.max(0, Math.min(getCount() - 1, position));
4556 final int position = mTargetPos;
4560 if (position < firstPos) {
4561 viewTravelCount = firstPos - position + 1;
4562 } else if (position > lastPos) {
4563 viewTravelCount = position - lastPos;
4570 if (position < firstPos) {
4575 } else if (position > lastPos) {
4582 final int targetTop = getChildAt(position - firstPos).getTop();
4622 * Smoothly scroll to the specified adapter position. The view will
4623 * scroll such that the indicated position is displayed.
4624 * @param position Scroll to this adapter position.
4626 public void smoothScrollToPosition(int position) {
4630 mPositionScroller.start(position);
4634 * Smoothly scroll to the specified adapter position. The view will scroll
4635 * such that the indicated position is displayed <code>offset</code> pixels from
4640 * @param position Position to scroll to
4641 * @param offset Desired distance in pixels of <code>position</code> from the top
4645 public void smoothScrollToPositionFromTop(int position, int offset, int duration) {
4649 mPositionScroller.startWithOffset(position, offset, duration);
4653 * Smoothly scroll to the specified adapter position. The view will scroll
4654 * such that the indicated position is displayed <code>offset</code> pixels from
4659 * @param position Position to scroll to
4660 * @param offset Desired distance in pixels of <code>position</code> from the top
4663 public void smoothScrollToPositionFromTop(int position, int offset) {
4667 mPositionScroller.startWithOffset(position, offset);
4671 * Smoothly scroll to the specified adapter position. The view will
4672 * scroll such that the indicated position is displayed, but it will
4675 * @param position Scroll to this adapter position.
4677 * position out of view.
4679 public void smoothScrollToPosition(int position, int boundPosition) {
4683 mPositionScroller.start(position, boundPosition);
4722 * Allows RemoteViews to scroll relatively to a position.
4724 void smoothScrollByOffset(int position) {
4726 if (position < 0) {
4728 } else if (position > 0) {
4742 if ((position < 0) && (visibleArea < visibleThreshold)) {
4746 } else if ((position > 0) && (visibleArea < visibleThreshold)) {
4752 smoothScrollToPosition(Math.max(0, Math.min(getCount(), index + position)));
4881 int position = firstPosition + i;
4882 if (position >= headerViewsCount && position < footerViewsStart) {
4883 mRecycler.addScrapView(child, position);
4899 int position = firstPosition + i;
4900 if (position >= headerViewsCount && position < footerViewsStart) {
4901 mRecycler.addScrapView(child, position);
4999 * @return A position to select. First we try mSelectedPosition. If that has been clobbered by
5004 int position = mSelectedPosition;
5005 if (position < 0) {
5006 position = mResurrectToPosition;
5008 position = Math.max(0, position);
5009 position = Math.min(position, mItemCount - 1);
5010 return position;
5017 * @return The position of the first (or only) item in the row containing y
5025 * @return The position of the first (or only) item in the row closest to y
5060 * Makes the item at the supplied position selected.
5062 * @param position the position of the new selection
5064 abstract void setSelectionInt(int position);
5109 // Remember the position of the first item
5276 // See if we can find a position in the new data with the same
5288 // to restore the scroll position too.
5292 // don't try to restore the exact position
5313 // We couldn't find matching data -- try to use the same position
5316 // Pin position to the available range
5984 * @param position Adapter position of the item that was checked or unchecked
5990 int position, long id, boolean checked);
6036 int position, long id, boolean checked) {
6037 mWrapped.onItemCheckedStateChanged(mode, position, id, checked);
6081 * The position the view was removed from when pulled out of the
6143 * The position of the first view stored in mActiveViews.
6150 * Views in mActiveViews represent a contiguous range of Views, with position of the first
6240 * @param firstActivePosition The position of the first view that will be stored in
6263 * Get the view corresponding to the specified position. The view will be removed from
6266 * @param position The position to look up in mActiveViews
6269 View getActiveView(int position) {
6270 int index = position - mFirstActivePosition;
6280 View getTransientStateView(int position) {
6284 final int index = mTransientStateViews.indexOfKey(position);
6305 View getScrapView(int position) {
6307 return retrieveFromScrap(mCurrentScrap, position);
6309 int whichScrap = mAdapter.getItemViewType(position);
6311 return retrieveFromScrap(mScrapViews[whichScrap], position);
6322 void addScrapView(View scrap, int position) {
6328 lp.scrappedFromPosition = position;
6346 mTransientStateViews.put(position, scrap);
6509 static View retrieveFromScrap(ArrayList<View> scrapViews, int position) {
6512 // See if we still have a view for this position.
6516 .scrappedFromPosition == position) {