/frameworks/support/samples/SupportLeanbackDemos/src/com/example/android/leanback/ |
H A D | PlaybackControlHelper.java | 221 long position = mStartPosition + 223 if (position > getMediaDuration()) { 224 position = getMediaDuration(); 226 } else if (position < 0) { 227 position = 0; 230 return (int) position;
|
H A D | PlaybackControlSupportHelper.java | 224 long position = mStartPosition + 226 if (position > getMediaDuration()) { 227 position = getMediaDuration(); 229 } else if (position < 0) { 230 position = 0; 233 return (int) position;
|
/frameworks/support/v7/appcompat/src/android/support/v7/widget/ |
H A D | AppCompatSpinner.java | 639 public Object getItem(int position) { argument 640 return mAdapter == null ? null : mAdapter.getItem(position); 644 public long getItemId(int position) { argument 645 return mAdapter == null ? -1 : mAdapter.getItemId(position); 649 public View getView(int position, View convertView, ViewGroup parent) { argument 650 return getDropDownView(position, convertView, parent); 654 public View getDropDownView(int position, View convertView, ViewGroup parent) { argument 656 : mAdapter.getDropDownView(position, convertView, parent); 697 public boolean isEnabled(int position) { argument 700 return adapter.isEnabled(position); 707 getItemViewType(int position) argument [all...] |
/frameworks/av/media/libaudioclient/ |
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 910 size_t position = localState->mPosition; local 1013 size_t position = (size_t) positionOrStatus; local [all...] |
/frameworks/support/v17/leanback/src/android/support/v17/leanback/app/ |
H A D | BrowseFragment.java | 236 void post(int position, int type, boolean smooth) { argument 243 mPosition = position; 538 * @return The position of selected row. 545 * @param position Position of Row. 548 public RowPresenter.ViewHolder findRowViewHolderByPosition(int position) { argument 553 private boolean createMainFragment(ObjectAdapter adapter, int position) { argument 560 if (position < 0) { 561 position = 0; 562 } else if (position >= adapter.size()) { 564 String.format("Invalid position 1467 onRowSelected(int position) argument 1474 setSelection(int position, boolean smooth) argument 1494 replaceMainFragment(int position) argument 1534 setSelectedPosition(int position) argument 1560 setSelectedPosition(int position, boolean smooth) argument [all...] |
H A D | BrowseSupportFragment.java | 239 void post(int position, int type, boolean smooth) { argument 246 mPosition = position; 541 * @return The position of selected row. 548 * @param position Position of Row. 551 public RowPresenter.ViewHolder findRowViewHolderByPosition(int position) { argument 556 private boolean createMainFragment(ObjectAdapter adapter, int position) { argument 563 if (position < 0) { 564 position = 0; 565 } else if (position >= adapter.size()) { 567 String.format("Invalid position 1470 onRowSelected(int position) argument 1477 setSelection(int position, boolean smooth) argument 1497 replaceMainFragment(int position) argument 1537 setSelectedPosition(int position) argument 1563 setSelectedPosition(int position, boolean smooth) argument [all...] |
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/ |
H A D | LinearLayoutManagerBaseConfigSetTest.java | 90 final int position = mRecyclerView.getChildLayoutPosition(child); 99 scrollToPositionWithOffset(position, scrollOffset); 108 + "child " + position, 209 int position) { 210 super.onBindViewHolder(holder, position); 300 int position = mRecyclerView.getChildLayoutPosition(child); 301 if (position < minPosition) { 302 minPosition = position; 304 if (position > maxPosition) { 305 maxPosition = position; [all...] |
H A D | StaggeredGridLayoutManagerTest.java | 113 void onBoundItem(TestViewHolder vh, int position) { 115 if (position == 1) { 131 assertEquals("first fully visible child should be at position", 134 assertEquals("last fully visible child should be at position", 138 assertEquals("first visible child should be at position", 141 assertEquals("last visible child should be at position", 164 void onBoundItem(TestViewHolder vh, int position) { 166 final int size = 1 + position * 5; 173 if (position == 3) { 216 void onBoundItem(TestViewHolder vh, int position) { [all...] |
H A D | BaseStaggeredGridLayoutManagerTest.java | 224 int position = mRecyclerView.getChildLayoutPosition(child); 225 if (position < minPosition) { 226 minPosition = position; 228 if (position > maxPosition) { 229 maxPosition = position; 251 protected void scrollToPositionWithOffset(final int position, final int offset) argument 256 mLayoutManager.scrollToPositionWithOffset(position, offset); 380 abstract void onBoundItem(TestViewHolder vh, int position); argument 696 final int position = getPosition(child); 699 if (position < visibleChildre 878 onBindViewHolder(TestViewHolder holder, int position) argument [all...] |
H A D | BaseLinearLayoutManagerTest.java | 130 assertEquals("pending scroll position should still be pending", 133 assertEquals("pending scroll position offset should still be pending", 139 assertNotNull("scroll to position should work", vh); 179 void scrollToPositionWithOffset(final int position, final int offset) throws Throwable { argument 183 mLayoutManager.scrollToPositionWithOffset(position, offset); 497 final int position = mCurrentPosition; 500 assertEquals("position of the returned view must match current position", 501 position, RecyclerView.getChildViewHolderInt(next).getLayoutPosition()); 556 final int position [all...] |
/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/widget/ |
H A D | ItemBridgeAdapter.java | 254 public int getItemViewType(int position) { argument 257 Object item = mAdapter.get(position); 351 public final void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { argument 352 if (DEBUG) Log.v(TAG, "onBindViewHolder position " + position); 354 viewHolder.mItem = mAdapter.get(position); 396 public long getItemId(int position) { argument 397 return mAdapter.getId(position);
|
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/ |
H A D | GridWidgetPrefetchTest.java | 68 public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { 96 // scroll to position 5, and layout 148 // scroll to position 5, and layout 214 public void onBindViewHolder(ViewHolder holder, int position) { argument 215 holder.mRecyclerView.swapAdapter(mAdapters.get(position), true); 217 Parcelable savedState = mSavedStates.get(position); 220 mSavedStates.set(position, null); 238 for (int position : positionData) { 239 verify(registry).addPosition(position, 0); 306 // center child 0 at position 1 [all...] |
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/ |
H A D | SelectPrinterActivity.java | 158 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { 159 if (!((DestinationAdapter) mListView.getAdapter()).isActionable(position)) { 163 PrinterInfo printer = (PrinterInfo) mListView.getAdapter().getItem(position); 285 final int position = ((AdapterContextMenuInfo) menuInfo).position; 286 PrinterInfo printer = (PrinterInfo) mListView.getAdapter().getItem(position); 616 public int getItemViewType(int position) { argument 618 if (getItem(position) == null) { 626 public Object getItem(int position) { argument 628 if (position < mFilteredPrinter 638 getItemId(int position) argument 643 getDropDownView(int position, View convertView, ViewGroup parent) argument 648 getView(int position, View convertView, ViewGroup parent) argument 742 isActionable(int position) argument [all...] |
/frameworks/base/services/net/java/android/net/apf/ |
H A D | ApfFilter.java | 333 // Note: mPacket's position() cannot be assumed to be reset. 360 // position pos in the packet. 423 * Assumes mPacket.position() is as far as we've parsed the packet. 426 * @param lifetimeOffset offset from mPacket.position() to the next lifetime data. 434 lifetimeOffset += mPacket.position(); 446 // Buffer.position(int) or due to an invalid-length option) or IndexOutOfBoundsException 480 mPacket.position(ICMP6_RA_OPTION_OFFSET); 482 final int position = mPacket.position(); 483 final int optionType = getUint8(mPacket, position); 1200 getUint8(ByteBuffer buffer, int position) argument 1204 getUint16(ByteBuffer buffer, int position) argument 1208 getUint32(ByteBuffer buffer, int position) argument [all...] |
/frameworks/support/v7/recyclerview/src/android/support/v7/widget/ |
H A D | StaggeredGridLayoutManager.java | 146 * When LayoutManager needs to scroll to a position, it sets this variable and requests a 374 return child; //i should have a better position 382 return child; //i should have a better position 442 * scroll position if this method is called after views are laid out. 644 // Scroll to position is set, clear. 836 // last child as the anchor position. 847 // Validate scroll position if exists. 863 // Use regular anchor position, offset according to pending offset and target 909 final int position = calculateScrollDirectionForPosition( 911 anchorInfo.mLayoutFromEnd = position 2005 calculateScrollDirectionForPosition(int position) argument 2031 smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) argument 2039 scrollToPosition(int position) argument 2061 scrollToPositionWithOffset(int position, int offset) argument 2810 forceInvalidateAfter(int position) argument 2825 invalidateAfter(int position) argument 2843 getSpan(int position) argument 2851 setSpan(int position, Span span) argument 2856 sizeForPosition(int position) argument 2864 ensureSize(int position) argument 2942 invalidateFullSpansAfter(int position) argument 2991 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 | 405 public void setSelectedNavigationItem(int position) { argument 408 selectTab(mTabs.get(position)); 411 mDecorToolbar.setDropdownSelectedPosition(position); 526 private void configureTab(Tab tab, int position) { argument 534 tabi.setPosition(position); 535 mTabs.add(position, tabi); 538 for (int i = position + 1; i < count; i++) { 549 public void addTab(Tab tab, int position) { argument 550 addTab(tab, position, mTabs.isEmpty()); 564 public void addTab(Tab tab, int position, boolea argument 584 removeTabAt(int position) argument 1207 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 | 408 public void setSelectedNavigationItem(int position) { argument 411 selectTab(mTabs.get(position)); 414 mDecorToolbar.setDropdownSelectedPosition(position); 542 private void configureTab(Tab tab, int position) { argument 550 tabi.setPosition(position); 551 mTabs.add(position, tabi); 554 for (int i = position + 1; i < count; i++) { 565 public void addTab(Tab tab, int position) { argument 566 addTab(tab, position, mTabs.isEmpty()); 580 public void addTab(Tab tab, int position, boolea argument 600 removeTabAt(int position) argument 1221 setPosition(int position) argument [all...] |