/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
D | ListHeterogeneous.java | 40 protected View createView(int position, ViewGroup parent, int desiredHeight) { in createView() argument 41 switch (position % 3) { in createView() 44 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView() 47 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView() 50 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView() 57 public View convertView(int position, View convertView, ViewGroup parent) { in convertView() argument 58 switch (position % 3) { in convertView() 60 return ListItemFactory.convertText(convertView, getValueAtPosition(position), position); in convertView() 62 return ListItemFactory.convertButton(convertView, getValueAtPosition(position), in convertView() 63 position); in convertView() [all …]
|
D | ListThrasher.java | 79 public Object getItem(int position) { in getItem() argument 80 return position; in getItem() 83 public long getItemId(int position) { in getItemId() argument 84 return position; in getItemId() 87 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 95 view.setText(mTitles[position] + " " + mVersion[position]); in getView() 101 int position = mRandomizer.nextInt(getCount()); in bumpVersion() local 102 mVersion[position]++; in bumpVersion() 124 public void onItemSelected(AdapterView parent, View v, int position, long id) { in onItemSelected() argument 125 mText.setText("Position " + position); in onItemSelected()
|
D | ListInterleaveFocusables.java | 43 protected View createView(int position, ViewGroup parent, int desiredHeight) { in createView() argument 44 if (mFocusablePositions.contains(position)) { in createView() 46 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView() 48 return super.createView(position, parent, desiredHeight); in createView() 53 public int getItemViewType(int position) { in getItemViewType() argument 54 return mFocusablePositions.contains(position) ? 0 : 1; in getItemViewType()
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | ListScenario.java | 90 private boolean isItemAtPositionSelectable(int position) { in isItemAtPositionSelectable() argument 91 return !mUnselectableItems.contains(position); in isItemAtPositionSelectable() 162 int position, double itemScreenSizeFactor) { in setPositionScreenSizeFactorOverride() argument 163 mOverrideItemScreenSizeFactors.put(position, itemScreenSizeFactor); in setPositionScreenSizeFactorOverride() 172 public Params setPositionUnselectable(int position) { in setPositionUnselectable() argument 173 mUnselectableItems.add(position); in setPositionUnselectable() 287 protected void positionClicked(int position) { in positionClicked() argument 288 setClickedPosition(position); in positionClicked() 296 protected void positionLongClicked(int position) { in positionLongClicked() argument 297 setLongClickedPosition(position); in positionLongClicked() [all …]
|
D | GridScenario.java | 139 int position, double itemScreenSizeFactor) { in setPositionScreenSizeFactorOverride() argument 140 mOverrideItemScreenSizeFactors.put(position, itemScreenSizeFactor); in setPositionScreenSizeFactorOverride() 266 public void onItemSelected(AdapterView parent, View v, int position, long id) { in onCreate() 267 positionSelected(position); in onCreate() 315 public final String getValueAtPosition(int position) { in getValueAtPosition() argument 316 return "postion " + position; in getValueAtPosition() 328 protected View createView(int position, ViewGroup parent, int desiredHeight) { in createView() argument 331 result.setText(getValueAtPosition(position)); in createView() 336 result.setId(position); in createView() 348 public Object getItem(int position) { in getItem() argument [all …]
|
D | ListItemFactory.java | 42 … public static View twoButtonsSeparatedByFiller(int position, Context context, int desiredHeight) { in twoButtonsSeparatedByFiller() argument 59 topButton.setText("top (position " + position + ")"); in twoButtonsSeparatedByFiller() 71 bottomButton.setText("bottom (position " + position + ")"); in twoButtonsSeparatedByFiller() 155 public static View button(int position, Context context, String text, int desiredHeight) { in button() argument 163 result.setId(position); in button() 176 public static View convertButton(View convertView, String text, int position) { in convertButton() argument 179 convertView.setId(position); in convertButton() 195 public static View text(int position, Context context, String text, int desiredHeight) { in text() argument 203 result.setId(position); in text() 216 public static View convertText(View convertView, String text, int position) { in convertText() argument [all …]
|
/frameworks/ex/common/java/com/android/common/widget/ |
D | CompositeCursorAdapter.java | 236 public int getPartitionForPosition(int position) { in getPartitionForPosition() argument 241 if (position >= start && position < end) { in getPartitionForPosition() 253 public int getOffsetInPartition(int position) { in getOffsetInPartition() argument 258 if (position >= start && position < end) { in getOffsetInPartition() 259 int offset = position - start; in getOffsetInPartition() 275 int position = 0; in getPositionForPartition() local 277 position += mPartitions[i].count; in getPositionForPartition() 279 return position; in getPositionForPartition() 300 protected int getItemViewType(int partition, int position) { in getItemViewType() argument 305 public int getItemViewType(int position) { in getItemViewType() argument [all …]
|
D | GroupingListAdapter.java | 268 public void obtainPositionMetadata(PositionMetadata metadata, int position) { in obtainPositionMetadata() argument 271 if (metadata.listPosition == position) { in obtainPositionMetadata() 284 if (position <= mLastCachedListPosition) { in obtainPositionMetadata() 287 int index = mPositionCache.indexOfKey(position); in obtainPositionMetadata() 340 if (position < listPosition) { in obtainPositionMetadata() 342 metadata.cursorPosition = cursorPosition - (listPosition - position); in obtainPositionMetadata() 350 if (position == listPosition) { in obtainPositionMetadata() 361 if (position < listPosition + size + 1) { in obtainPositionMetadata() 363 metadata.cursorPosition = cursorPosition + (position - listPosition) - 1; in obtainPositionMetadata() 381 metadata.cursorPosition = cursorPosition + (position - listPosition); in obtainPositionMetadata() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | RemoteViewsAdapter.java | 284 public void add(int position, RemoteViewsFrameLayout layout) { in add() argument 285 final Integer pos = position; in add() 304 public void notifyOnRemoteViewsLoaded(int position, RemoteViews view, int typeId) { in notifyOnRemoteViewsLoaded() argument 307 final Integer pos = position; in notifyOnRemoteViewsLoaded() 393 private RemoteViewsFrameLayout createLoadingView(int position, View convertView, in createLoadingView() argument 538 public void insert(int position, RemoteViews v, long itemId, boolean isRequested) { in insert() argument 541 mIndexRemoteViews.remove(getFarthestPositionFrom(position)); in insert() 545 int pruneFromPosition = (mLastRequestedIndex > -1) ? mLastRequestedIndex : position; in insert() 556 if (mIndexMetaData.containsKey(position)) { in insert() 557 final RemoteViewsIndexMetaData metaData = mIndexMetaData.get(position); in insert() [all …]
|
D | HeaderViewListAdapter.java | 146 public boolean isEnabled(int position) { in isEnabled() argument 149 if (position < numHeaders) { in isEnabled() 150 return mHeaderViewInfos.get(position).isSelectable; in isEnabled() 154 final int adjPosition = position - numHeaders; in isEnabled() 167 public Object getItem(int position) { in getItem() argument 170 if (position < numHeaders) { in getItem() 171 return mHeaderViewInfos.get(position).data; in getItem() 175 final int adjPosition = position - numHeaders; in getItem() 188 public long getItemId(int position) { in getItemId() argument 190 if (mAdapter != null && position >= numHeaders) { in getItemId() [all …]
|
D | AbsSpinner.java | 120 int position = mItemCount > 0 ? 0 : INVALID_POSITION; in setAdapter() local 122 setSelectedPositionInt(position); in setAdapter() 123 setNextSelectedPositionInt(position); in setAdapter() 257 final int position = mFirstPosition; in recycleAllViews() local 262 int index = position + i; in recycleAllViews() 270 public void setSelection(int position, boolean animate) { in setSelection() argument 272 boolean shouldAnimate = animate && mFirstPosition <= position && in setSelection() 273 position <= mFirstPosition + getChildCount() - 1; in setSelection() 274 setSelectionInt(position, shouldAnimate); in setSelection() 278 public void setSelection(int position) { in setSelection() argument [all …]
|
D | ExpandableListView.java | 293 if (pos.position.type != lastItemType) { in dispatchDraw() 294 if (pos.position.type == ExpandableListPosition.CHILD) { in dispatchDraw() 307 lastItemType = pos.position.type; in dispatchDraw() 348 if (pos.position.type == ExpandableListPosition.GROUP) { in getIndicator() 368 final int stateSet[] = pos.position.flatListPos == pos.groupMetadata.lastChildFlPos in getIndicator() 399 if ((pos.position.type == ExpandableListPosition.CHILD) || (pos.isExpanded() && in drawDivider() 485 private boolean isHeaderOrFooterPosition(int position) { in isHeaderOrFooterPosition() argument 487 return (position < getHeaderViewsCount() || position >= footerViewsStart); in isHeaderOrFooterPosition() 513 public boolean performItemClick(View v, int position, long id) { in performItemClick() argument 515 if (isHeaderOrFooterPosition(position)) { in performItemClick() [all …]
|
D | AdapterView.java | 262 void onItemClick(AdapterView<?> parent, View view, int position, long id); in onItemClick() argument 292 public boolean performItemClick(View view, int position, long id) { in performItemClick() argument 298 mOnItemClickListener.onItemClick(this, view, position, id); in performItemClick() 324 boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id); in onItemLongClick() argument 368 void onItemSelected(AdapterView<?> parent, View view, int position, long id); in onItemSelected() argument 403 public AdapterContextMenuInfo(View targetView, int position, long id) { in AdapterContextMenuInfo() argument 405 this.position = position; in AdapterContextMenuInfo() 419 public int position; field in AdapterView.AdapterContextMenuInfo 643 public abstract void setSelection(int position); in setSelection() argument 761 public Object getItemAtPosition(int position) { in getItemAtPosition() argument [all …]
|
/frameworks/base/tests/RenderScriptTests/Balls/src/com/example/android/rs/balls/ |
D | ball_physics.rs | 26 float2 pos = ballIn->position; 33 float2 vec = bPtr[xin].position - pos; 52 ballOut->position = ballIn->position; 54 ballOut->position.x += 1.f; 56 ballOut->position.x -= 1.f; 83 float2 vec = touchPos[i] - ballIn->position; 91 ballOut->position = ballIn->position + (ballOut->delta * ctl->dt); 94 if (ballOut->position.x > (gMaxPos.x - 20.f)) { 95 float d = gMaxPos.x - ballOut->position.x; 100 ballOut->position.x = gMaxPos.x; [all …]
|
/frameworks/support/v4/java/android/support/v4/view/ |
D | PagerAdapter.java | 109 public Object instantiateItem(ViewGroup container, int position) { in instantiateItem() argument 110 return instantiateItem((View) container, position); in instantiateItem() 123 public void destroyItem(ViewGroup container, int position, Object object) { in destroyItem() argument 124 destroyItem((View) container, position, object); in destroyItem() local 136 public void setPrimaryItem(ViewGroup container, int position, Object object) { in setPrimaryItem() argument 137 setPrimaryItem((View) container, position, object); in setPrimaryItem() local 174 public Object instantiateItem(View container, int position) { in instantiateItem() argument 191 public void destroyItem(View container, int position, Object object) { in destroyItem() argument 206 public void setPrimaryItem(View container, int position, Object object) { in setPrimaryItem() argument 296 public CharSequence getPageTitle(int position) { in getPageTitle() argument [all …]
|
/frameworks/opt/mailcommon/java/com/android/mailcommon/ |
D | MergedAdapter.java | 107 public LocalAdapterPosition<T> getAdapterOffsetForItem(final int position) { in getAdapterOffsetForItem() argument 115 if (position < newCount) { in getAdapterOffsetForItem() 116 return new LocalAdapterPosition<T>(a, position - count); in getAdapterOffsetForItem() 125 public Object getItem(int position) { in getItem() argument 126 LocalAdapterPosition<T> result = getAdapterOffsetForItem(position); in getItem() 134 public long getItemId(int position) { in getItemId() argument 135 return position; in getItemId() 148 public int getItemViewType(int position) { in getItemViewType() argument 149 LocalAdapterPosition<T> result = getAdapterOffsetForItem(position); in getItemViewType() 167 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument [all …]
|
D | MultiAdapterSpinner.java | 72 boolean canSelect(int position); in canSelect() argument 76 void onClick(int position); in onClick() argument 88 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 89 return super.getDropDownView(position, convertView, parent); in getView() 112 public void setSelectedItem(final FancySpinnerAdapter adapter, final int position) { in setSelectedItem() argument 119 globalPosition += position; in setSelectedItem() 126 if (adapter.canSelect(position)) { in setSelectedItem() 128 View itemView = adapter.getView(position, null, this); in setSelectedItem() 133 if (position < adapter.getCount()) { in setSelectedItem() 163 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in onItemClick() argument [all …]
|
/frameworks/base/core/java/android/preference/ |
D | PreferenceGroupAdapter.java | 200 public Preference getItem(int position) { in getItem() argument 201 if (position < 0 || position >= getCount()) return null; in getItem() 202 return mPreferenceList.get(position); in getItem() 205 public long getItemId(int position) { in getItemId() argument 206 if (position < 0 || position >= getCount()) return ListView.INVALID_ROW_ID; in getItemId() 207 return this.getItem(position).getId(); in getItemId() 210 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 211 final Preference preference = this.getItem(position); in getView() 225 public boolean isEnabled(int position) { in isEnabled() argument 226 if (position < 0 || position >= getCount()) return true; in isEnabled() [all …]
|
/frameworks/support/v4/java/android/support/v4/app/ |
D | FragmentStatePagerAdapter.java | 82 public abstract Fragment getItem(int position); in getItem() argument 89 public Object instantiateItem(ViewGroup container, int position) { in instantiateItem() argument 94 if (mFragments.size() > position) { in instantiateItem() 95 Fragment f = mFragments.get(position); in instantiateItem() 105 Fragment fragment = getItem(position); in instantiateItem() 106 if (DEBUG) Log.v(TAG, "Adding item #" + position + ": f=" + fragment); in instantiateItem() 107 if (mSavedState.size() > position) { in instantiateItem() 108 Fragment.SavedState fss = mSavedState.get(position); in instantiateItem() 113 while (mFragments.size() <= position) { in instantiateItem() 117 mFragments.set(position, fragment); in instantiateItem() [all …]
|
D | FragmentPagerAdapter.java | 76 public abstract Fragment getItem(int position); in getItem() argument 83 public Object instantiateItem(ViewGroup container, int position) { in instantiateItem() argument 88 final long itemId = getItemId(position); in instantiateItem() 97 fragment = getItem(position); in instantiateItem() 111 public void destroyItem(ViewGroup container, int position, Object object) { in destroyItem() argument 115 if (DEBUG) Log.v(TAG, "Detaching item #" + getItemId(position) + ": f=" + object in destroyItem() 121 public void setPrimaryItem(ViewGroup container, int position, Object object) { in setPrimaryItem() argument 168 public long getItemId(int position) { in getItemId() argument 169 return position; in getItemId()
|
/frameworks/support/v13/java/android/support/v13/app/ |
D | FragmentStatePagerAdapter.java | 86 public abstract Fragment getItem(int position); in getItem() argument 93 public Object instantiateItem(ViewGroup container, int position) { in instantiateItem() argument 98 if (mFragments.size() > position) { in instantiateItem() 99 Fragment f = mFragments.get(position); in instantiateItem() 109 Fragment fragment = getItem(position); in instantiateItem() 110 if (DEBUG) Log.v(TAG, "Adding item #" + position + ": f=" + fragment); in instantiateItem() 111 if (mSavedState.size() > position) { in instantiateItem() 112 Fragment.SavedState fss = mSavedState.get(position); in instantiateItem() 117 while (mFragments.size() <= position) { in instantiateItem() 121 mFragments.set(position, fragment); in instantiateItem() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/gridview/ |
D | GridThrasher.java | 81 public Object getItem(int position) { in getItem() argument 82 return position; in getItem() 85 public long getItemId(int position) { in getItemId() argument 86 return position; in getItemId() 89 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 97 view.setText(mTitles[position] + " " + mVersion[position]); in getView() 103 int position = mRandomizer.nextInt(getCount()); in bumpVersion() local 104 mVersion[position]++; in bumpVersion() 128 public void onItemSelected(AdapterView parent, View v, int position, long id) { in onItemSelected() argument 129 mText.setText("Position " + position); in onItemSelected()
|
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/binding/ |
D | FakeAdapter.java | 78 public boolean isEnabled(int position) { in isEnabled() argument 88 public Object getItem(int position) { in getItem() argument 89 return mItems.get(position); in getItem() 93 public long getItemId(int position) { in getItemId() argument 94 return position; in getItemId() 98 public int getItemViewType(int position) { in getItemViewType() argument 99 return mItems.get(position).getType(); in getItemViewType() 103 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 105 AdapterItem item = mItems.get(position); in getView() 117 public View getDropDownView(int position, View convertView, ViewGroup parent) { in getDropDownView() argument
|
/frameworks/base/core/java/com/android/internal/app/ |
D | MediaRouteChooserDialogFragment.java | 205 public int position; field in MediaRouteChooserDialogFragment.ViewHolder 349 public int getItemViewType(int position) { in getItemViewType() argument 350 final Object item = getItem(position); in getItemViewType() 352 return position == 0 ? VIEW_TOP_HEADER : VIEW_SECTION_HEADER; in getItemViewType() 370 public boolean isEnabled(int position) { in isEnabled() argument 371 switch (getItemViewType(position)) { in isEnabled() 382 public Object getItem(int position) { in getItem() argument 383 return mItems.get(position); in getItem() 387 public long getItemId(int position) { in getItemId() argument 388 return position; in getItemId() [all …]
|
/frameworks/base/core/tests/coretests/src/android/widget/focus/ |
D | ListOfInternalSelectionViews.java | 77 public String getLabelForPosition(int position) { in getLabelForPosition() argument 78 return "position " + position; in getLabelForPosition() 156 public Object getItem(int position) { in getItem() argument 157 return getLabelForPosition(position); in getItem() 160 public long getItemId(int position) { in getItemId() argument 161 return position; in getItemId() 164 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument 169 getLabelForPosition(position)); in getView()
|