/frameworks/support/samples/SupportDesignDemos/src/com/example/android/support/design/widget/ |
H A D | TabLayoutUsage.java | 166 public Object instantiateItem(ViewGroup container, int position) { argument 168 tv.setText(getPageTitle(position)); 175 item.cheese = mCheeses.get(position); 187 public CharSequence getPageTitle(int position) { argument 188 return mCheeses.get(position); 192 public void destroyItem(ViewGroup container, int position, Object object) { argument
|
/frameworks/support/samples/SupportLeanbackDemos/src/com/example/android/leanback/ |
H A D | PlaybackControlHelper.java | 218 long position = mStartPosition + 220 if (position > getMediaDuration()) { 221 position = getMediaDuration(); 223 } else if (position < 0) { 224 position = 0; 227 return (int) position;
|
H A D | PlaybackControlSupportHelper.java | 220 long position = mStartPosition + 222 if (position > getMediaDuration()) { 223 position = getMediaDuration(); 225 } else if (position < 0) { 226 position = 0; 229 return (int) position;
|
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/ |
H A D | GridLayoutManager.java | 204 // to the target position. 256 // -2 is a target position that LinearSmoothScroller can never find until 436 * The focused position, it's not the currently visually aligned position 437 * but it is the final position that we intend to focus on. If there are 443 * A view can have multiple alignment position, this is the index of which 533 * How to position child in secondary direction. 576 * Allow DPAD key to navigate out at the front of the View (where position = 0), 835 int position, int subposition) { 841 position, subpositio 834 fireOnChildViewHolderSelected(RecyclerView parent, RecyclerView.ViewHolder child, int position, int subposition) argument 970 getViewForPosition(int position) argument 1176 measureScrapChild(int position, int widthSpec, int heightSpec, int[] measuredDimension) argument 2208 scrollToPosition(int position) argument 2212 setSelection(int position, int primaryScrollExtra) argument 2217 setSelectionSmooth(int position) argument 2221 setSelectionWithSub(int position, int subposition, int primaryScrollExtra) argument 2226 setSelectionSmoothWithSub(int position, int subposition) argument 2238 setSelection(int position, int subposition, boolean smooth, int primaryScrollExtra) argument 2246 scrollToSelection(int position, int subposition, boolean smooth, int primaryScrollExtra) argument 2277 startPositionSmoothScroller(int position) argument [all...] |
H A D | ItemBridgeAdapter.java | 245 public int getItemViewType(int position) { argument 248 Object item = mAdapter.get(position); 342 public final void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { argument 343 if (DEBUG) Log.v(TAG, "onBindViewHolder position " + position); 345 viewHolder.mItem = mAdapter.get(position); 387 public long getItemId(int position) { argument 388 return mAdapter.getId(position);
|
/frameworks/support/v7/appcompat/src/android/support/v7/widget/ |
H A D | AppCompatSpinner.java | 629 public Object getItem(int position) { argument 630 return mAdapter == null ? null : mAdapter.getItem(position); 633 public long getItemId(int position) { argument 634 return mAdapter == null ? -1 : mAdapter.getItemId(position); 637 public View getView(int position, View convertView, ViewGroup parent) { argument 638 return getDropDownView(position, convertView, parent); 641 public View getDropDownView(int position, View convertView, ViewGroup parent) { argument 643 : mAdapter.getDropDownView(position, convertView, parent); 679 public boolean isEnabled(int position) { argument 682 return adapter.isEnabled(position); 688 getItemViewType(int position) argument [all...] |
/frameworks/av/media/libmedia/ |
H A D | AudioTrackShared.cpp | 35 // for the loop and position sequence counters. It should return 550 // observed buffer position and loop count will freeze until then to give the 553 // preserve behavior to restart at mState.mLoopStart if position exceeds mState.mLoopEnd. 561 void StaticAudioTrackClientProxy::setBufferPosition(size_t position) argument 564 if (position > UINT32_MAX) { 568 mState.mPosition = (uint32_t) position; 571 // observed buffer position and loop count will freeze until then to give the 574 getBufferPositionAndLoopCount(NULL, NULL); // get last position 576 mPosLoop.mBufferPosition = position; 577 if (position > 584 setBufferPositionAndLoop(size_t position, size_t loopStart, size_t loopEnd, int loopCount) argument 597 getBufferPositionAndLoopCount( size_t *position, int *loopCount) argument 908 size_t position = localState->mPosition; local 1011 size_t position = (size_t) positionOrStatus; local [all...] |
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/ |
H A D | RootsFragment.java | 190 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { 191 Item item = mAdapter.getItem(position); 212 public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { 213 final Item item = mAdapter.getItem(position); 377 public View getView(int position, View convertView, ViewGroup parent) { argument 378 final Item item = getItem(position); 388 public boolean isEnabled(int position) { argument 389 return getItemViewType(position) != 1; 393 public int getItemViewType(int position) { argument 394 final Item item = getItem(position); [all...] |
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
H A D | LinearLayoutManagerBaseConfigSetTest.java | 91 final int position = mRecyclerView.getChildLayoutPosition(child); 100 scrollToPositionWithOffset(position, scrollOffset); 109 + "child " + position, 210 int position) { 211 super.onBindViewHolder(holder, position); 301 int position = mRecyclerView.getChildLayoutPosition(child); 302 if (position < minPosition) { 303 minPosition = position; 305 if (position > maxPosition) { 306 maxPosition = position; [all...] |
H A D | BaseStaggeredGridLayoutManagerTest.java | 219 int position = mRecyclerView.getChildLayoutPosition(child); 220 if (position < minPosition) { 221 minPosition = position; 223 if (position > maxPosition) { 224 maxPosition = position; 246 protected void scrollToPositionWithOffset(final int position, final int offset) argument 251 mLayoutManager.scrollToPositionWithOffset(position, offset); 375 abstract void onBoundItem(TestViewHolder vh, int position); argument 691 final int position = getPosition(child); 694 if (position < visibleChildre 873 onBindViewHolder(TestViewHolder holder, int position) argument [all...] |
H A D | BaseLinearLayoutManagerTest.java | 131 assertEquals("pending scroll position should still be pending", 134 assertEquals("pending scroll position offset should still be pending", 140 assertNotNull("scroll to position should work", vh); 180 void scrollToPositionWithOffset(final int position, final int offset) throws Throwable { argument 184 mLayoutManager.scrollToPositionWithOffset(position, offset); 498 final int position = mCurrentPosition; 501 assertEquals("position of the returned view must match current position", 502 position, RecyclerView.getChildViewHolderInt(next).getLayoutPosition()); 557 final int position [all...] |
H A D | StaggeredGridLayoutManagerSavedStateTest.java | 83 return "scroll to position item count * 3 / 4"; 97 return "scroll to position item count / 3 with positive offset"; 111 return "scroll to position with negative offset"; 153 void onBoundItem(TestViewHolder vh, int position) { 213 assertEquals(mConfig + " on saved state, first completely visible child position should" 239 public void scrollToPositionWithOffset(int position, int offset) throws Throwable { argument 240 mTest.scrollToPositionWithOffset(position, offset); 243 public void scrollToPosition(int position) throws Throwable { argument 244 mTest.scrollToPosition(position);
|
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/util/ |
H A D | SortedListTest.java | 56 public abstract void onInserted(int position, int count); argument 60 public abstract void onChanged(int position, int count); argument 74 public void onInserted(int position, int count) { 75 mAdditions.add(new Pair(position, count)); 77 mInsertedCallback.onInserted(position, count); 82 public void onRemoved(int position, int count) { 83 mRemovals.add(new Pair(position, count)); 92 public void onChanged(int position, int count) { 93 mUpdates.add(new Pair(position, count)); 95 mChangedCallback.onChanged(position, coun [all...] |
/frameworks/base/core/tests/BTtraffic/src/com/android/google/experimental/bttraffic/ |
H A D | BTtraffic.java | 237 int position = byteBuffer.position(); 238 int remaining = numToRead - position; 242 int count = inputStream.read(byteBuffer.array(), position, remaining); 246 byteBuffer.position(position + count); 324 outputStream.write(lengthBuffer.array(), lengthBuffer.position(), lengthBuffer.limit());
|
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/date/ |
H A D | DayPickerView.java | 186 final int position = (day.year - mController.getMinYear()) 204 // Compute the first and last position visible 217 Log.d(TAG, "GoTo position " + position); 221 if (position != selectedPosition || forceScroll) { 226 position, LIST_TOP_OFFSET, GOTO_SCROLL_DURATION); 229 postSetSelection(position); 237 public void postSetSelection(final int position) { argument 243 setSelection(position); 308 // Fix the position afte [all...] |
/frameworks/support/v17/leanback/src/android/support/v17/leanback/app/ |
H A D | DetailsFragment.java | 107 int position = mRowsFragment.getVerticalGridView().getSelectedPosition(); 109 if (DEBUG) Log.v(TAG, "row selected position " + position 111 onRowSelected(position, subposition); 221 // align the top edge of item to a fixed position 299 * Sets the selected row position with smooth animation. 301 public void setSelectedPosition(int position) { argument 302 setSelectedPosition(position, true); 306 * Sets the selected row position. 308 public void setSelectedPosition(int position, boolea argument [all...] |
H A D | DetailsSupportFragment.java | 109 int position = mRowsSupportFragment.getVerticalGridView().getSelectedPosition(); 111 if (DEBUG) Log.v(TAG, "row selected position " + position 113 onRowSelected(position, subposition); 223 // align the top edge of item to a fixed position 301 * Sets the selected row position with smooth animation. 303 public void setSelectedPosition(int position) { argument 304 setSelectedPosition(position, true); 308 * Sets the selected row position. 310 public void setSelectedPosition(int position, boolea argument [all...] |
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/ |
H A D | StaggeredGridLayoutManager.java | 148 * When LayoutManager needs to scroll to a position, it sets this variable and requests a 370 return child;//i should have a better position 378 return child;//i should have a better position 438 * scroll position if this method is called after views are laid out. 640 // Scroll to position is set, clear. 832 // last child as the anchor position. 843 // Validate scroll position if exists. 859 // Use regular anchor position, offset according to pending offset and target 905 final int position = calculateScrollDirectionForPosition( 907 anchorInfo.mLayoutFromEnd = position 2003 calculateScrollDirectionForPosition(int position) argument 2029 smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) argument 2037 scrollToPosition(int position) argument 2059 scrollToPositionWithOffset(int position, int offset) argument 2681 forceInvalidateAfter(int position) argument 2696 invalidateAfter(int position) argument 2714 getSpan(int position) argument 2722 setSpan(int position, Span span) argument 2727 sizeForPosition(int position) argument 2735 ensureSize(int position) argument 2813 invalidateFullSpansAfter(int position) argument 2862 getFullSpanItem(int position) argument [all...] |
/frameworks/support/v7/recyclerview/src/android/support/v7/util/ |
H A D | SortedList.java | 464 * You can use this method if you need to change an existing Item such that its position in the 472 * If the new position of the item is different than the provided <code>index</code>, 508 * This method can be used to recalculate the position of the item at the given index, without 511 * If you are editing objects in the list such that their position in the list may change but 512 * you don't want to trigger an onChange animation, you can use this method to re-position it. 513 * If the item changes position, SortedList will call {@link Callback#onMoved(int, int)} 520 * final int position = mSortedList.indexOf(item); 522 * mSortedList.recalculatePositionOfItemAt(position); 527 * gets the position before editing the item, edits it and informs the SortedList that item 530 * @param index The current index of the Item whose position shoul 706 onChanged(int position, int count) argument 709 onChanged(int position, int count, Object payload) argument 784 onInserted(int position, int count) argument 789 onRemoved(int position, int count) argument 799 onChanged(int position, int count) argument [all...] |
/frameworks/base/core/java/android/accounts/ |
H A D | ChooseAccountTypeActivity.java | 109 public void onItemClick(AdapterView<?> parent, View v, int position, long id) { 110 setResultAndFinish(mAuthenticatorInfosToDisplay.get(position).desc.type); 184 public View getView(int position, View convertView, ViewGroup parent) { argument 197 holder.text.setText(mInfos.get(position).name); 198 holder.icon.setImageDrawable(mInfos.get(position).drawable);
|
/frameworks/base/core/java/android/app/ |
H A D | ListFragment.java | 159 public void onItemClick(AdapterView<?> parent, View v, int position, long id) { 160 onListItemClick((ListView)parent, v, position, id); 222 * getListView().getItemAtPosition(position) if they need to access the 227 * @param position The position of the view in the list 230 public void onListItemClick(ListView l, View v, int position, long id) { argument 251 * position with the adapter's data 253 * @param position 255 public void setSelection(int position) { argument 257 mList.setSelection(position); [all...] |
/frameworks/base/core/java/com/android/internal/app/ |
H A D | WindowDecorActionBar.java | 408 public void setSelectedNavigationItem(int position) { argument 411 selectTab(mTabs.get(position)); 414 mDecorToolbar.setDropdownSelectedPosition(position); 529 private void configureTab(Tab tab, int position) { argument 537 tabi.setPosition(position); 538 mTabs.add(position, tabi); 541 for (int i = position + 1; i < count; i++) { 552 public void addTab(Tab tab, int position) { argument 553 addTab(tab, position, mTabs.isEmpty()); 567 public void addTab(Tab tab, int position, boolea argument 587 removeTabAt(int position) argument 1216 setPosition(int position) argument [all...] |
/frameworks/data-binding/integration-tests/TestApp/app/src/main/java/android/databinding/testapp/vo/ |
H A D | ListenerBindingObject.java | 71 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { } argument 73 public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { argument 77 public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { } argument 134 public boolean onSuggestionClick(int position) { argument 138 public boolean onSuggestionSelect(int position) { argument
|
/frameworks/support/fragment/java/android/support/v4/app/ |
H A D | ListFragment.java | 59 public void onItemClick(AdapterView<?> parent, View v, int position, long id) { 60 onListItemClick((ListView)parent, v, position, id); 166 * getListView().getItemAtPosition(position) if they need to access the 171 * @param position The position of the view in the list 174 public void onListItemClick(ListView l, View v, int position, long id) { argument 195 * position with the adapter's data 197 * @param position 199 public void setSelection(int position) { argument 201 mList.setSelection(position); [all...] |
/frameworks/support/v7/appcompat/src/android/support/v7/app/ |
H A D | WindowDecorActionBar.java | 405 public void setSelectedNavigationItem(int position) { argument 408 selectTab(mTabs.get(position)); 411 mDecorToolbar.setDropdownSelectedPosition(position); 525 private void configureTab(Tab tab, int position) { argument 533 tabi.setPosition(position); 534 mTabs.add(position, tabi); 537 for (int i = position + 1; i < count; i++) { 548 public void addTab(Tab tab, int position) { argument 549 addTab(tab, position, mTabs.isEmpty()); 563 public void addTab(Tab tab, int position, boolea argument 583 removeTabAt(int position) argument 1199 setPosition(int position) argument [all...] |