Home
last modified time | relevance | path

Searched refs:position (Results 1 – 25 of 468) sorted by relevance

12345678910>>...19

/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListHeterogeneous.java40 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 …]
DListThrasher.java79 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()
DListInterleaveFocusables.java43 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/
DListScenario.java90 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 …]
DGridScenario.java139 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 …]
/frameworks/base/libs/hwui/
DPathTessellator.cpp27 i, buffer[i].position[0], buffer[i].position[1], buffer[i].alpha); \
31 ALOGD("point %d at %f %f", i, buffer[i].position[0], buffer[i].position[1]); \
70 Vertex::set(destPtr, srcPtr->position[0], srcPtr->position[1]); in copyVertex()
74 AlphaVertex::set(destPtr, srcPtr->position[0], srcPtr->position[1], srcPtr->alpha); in copyAlphaVertex()
195 vec2 lastNormal(current->position[1] - last->position[1], in getStrokeVerticesFromPerimeter()
196 last->position[0] - current->position[0]); in getStrokeVerticesFromPerimeter()
200 vec2 nextNormal(next->position[1] - current->position[1], in getStrokeVerticesFromPerimeter()
201 current->position[0] - next->position[0]); in getStrokeVerticesFromPerimeter()
208 current->position[0] + totalOffset.x, in getStrokeVerticesFromPerimeter()
209 current->position[1] + totalOffset.y); in getStrokeVerticesFromPerimeter()
[all …]
/frameworks/ex/common/java/com/android/common/widget/
DCompositeCursorAdapter.java236 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 …]
DGroupingListAdapter.java268 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/opt/photoviewer/src/com/android/ex/photo/adapters/
DBaseCursorPagerAdapter.java67 public abstract Fragment getItem(Context context, Cursor cursor, int position); in getItem() argument
72 public Fragment getItem(int position) { in getItem() argument
73 if (mCursor != null && moveCursorTo(position)) { in getItem()
74 return getItem(mContext, mCursor, position); in getItem()
89 public Object instantiateItem(View container, int position) { in instantiateItem() argument
95 if (moveCursorTo(position)) { in instantiateItem()
102 final Object obj = super.instantiateItem(container, position); in instantiateItem()
110 public void destroyItem(View container, int position, Object object) { in destroyItem() argument
113 super.destroyItem(container, position, object); in destroyItem()
123 final int position = mItemPosition.get(rowId, POSITION_NONE); in getItemPosition() local
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/
DAbsSpinnerICS.java101 int position = mItemCount > 0 ? 0 : INVALID_POSITION; in setAdapter() local
103 setSelectedPositionInt(position); in setAdapter()
104 setNextSelectedPositionInt(position); in setAdapter()
239 final int position = mFirstPosition; in recycleAllViews() local
244 int index = position + i; in recycleAllViews()
252 public void setSelection(int position, boolean animate) { in setSelection() argument
254 boolean shouldAnimate = animate && mFirstPosition <= position && in setSelection()
255 position <= mFirstPosition + getChildCount() - 1; in setSelection()
256 setSelectionInt(position, shouldAnimate); in setSelection()
260 public void setSelection(int position) { in setSelection() argument
[all …]
DAdapterViewICS.java258 void onItemClick(AdapterViewICS<?> parent, View view, int position, long id); in onItemClick() argument
270 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in onItemClick() argument
271 mWrappedListener.onItemClick(AdapterViewICS.this, view, position, id); in onItemClick()
302 public boolean performItemClick(View view, int position, long id) { in performItemClick() argument
308 mOnItemClickListener.onItemClick(this, view, position, id); in performItemClick()
334 boolean onItemLongClick(AdapterViewICS<?> parent, View view, int position, long id); in onItemLongClick() argument
378 void onItemSelected(AdapterViewICS<?> parent, View view, int position, long id); in onItemSelected() argument
413 public AdapterContextMenuInfo(View targetView, int position, long id) { in AdapterContextMenuInfo() argument
415 this.position = position; in AdapterContextMenuInfo()
429 public int position; field in AdapterViewICS.AdapterContextMenuInfo
[all …]
/frameworks/base/core/java/android/widget/
DHeaderViewListAdapter.java146 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 …]
DAbsSpinner.java120 int position = mItemCount > 0 ? 0 : INVALID_POSITION; in setAdapter() local
122 setSelectedPositionInt(position); in setAdapter()
123 setNextSelectedPositionInt(position); in setAdapter()
255 final int position = mFirstPosition; in recycleAllViews() local
260 int index = position + i; in recycleAllViews()
268 public void setSelection(int position, boolean animate) { in setSelection() argument
270 boolean shouldAnimate = animate && mFirstPosition <= position && in setSelection()
271 position <= mFirstPosition + getChildCount() - 1; in setSelection()
272 setSelectionInt(position, shouldAnimate); in setSelection()
276 public void setSelection(int position) { in setSelection() argument
[all …]
DRemoteViewsAdapter.java333 public void add(int position, RemoteViewsFrameLayout layout) { in add() argument
334 final Integer pos = position; in add()
354 public void notifyOnRemoteViewsLoaded(int position, RemoteViews view) { in notifyOnRemoteViewsLoaded() argument
357 final Integer pos = position; in notifyOnRemoteViewsLoaded()
465 private RemoteViewsFrameLayout createLoadingView(int position, View convertView, in createLoadingView() argument
611 public void insert(int position, RemoteViews v, long itemId, in insert() argument
615 mIndexRemoteViews.remove(getFarthestPositionFrom(position, visibleWindow)); in insert()
619 int pruneFromPosition = (mLastRequestedIndex > -1) ? mLastRequestedIndex : position; in insert()
630 if (mIndexMetaData.containsKey(position)) { in insert()
631 final RemoteViewsIndexMetaData metaData = mIndexMetaData.get(position); in insert()
[all …]
DRemoteViewsListAdapter.java75 public Object getItem(int position) { in getItem() argument
80 public long getItemId(int position) { in getItemId() argument
81 return position; in getItemId()
85 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
86 if (position < getCount()) { in getView()
87 RemoteViews rv = mRemoteViewsList.get(position); in getView()
104 public int getItemViewType(int position) { in getItemViewType() argument
105 if (position < getCount()) { in getItemViewType()
106 int layoutId = mRemoteViewsList.get(position).getLayoutId(); in getItemViewType()
/frameworks/support/v4/java/android/support/v4/view/
DPagerAdapter.java109 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
306 public CharSequence getPageTitle(int position) { in getPageTitle() argument
[all …]
/frameworks/opt/mailcommon/java/com/android/mailcommon/
DMergedAdapter.java107 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 …]
DMultiAdapterSpinner.java72 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/
DPreferenceGroupAdapter.java200 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/base/core/tests/coretests/src/android/widget/gridview/
DGridThrasher.java81 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/support/v13/java/android/support/v13/app/
DFragmentStatePagerAdapter.java86 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()
122 mFragments.set(position, fragment); in instantiateItem()
[all …]
/frameworks/support/v4/java/android/support/v4/app/
DFragmentStatePagerAdapter.java82 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()
118 mFragments.set(position, fragment); in instantiateItem()
[all …]
/frameworks/base/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/binding/
DFakeAdapter.java78 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/media/tests/EffectsTest/src/com/android/effectstest/
DEffectsTest.java121 public Object getItem(int position) { in getItem() argument
122 Log.d(TAG, "EffectListAdapter getItem() at: "+position+" name: " in getItem()
123 +mDescriptors[position].name); in getItem()
124 return mDescriptors[position]; in getItem()
127 public long getItemId(int position) { in getItemId() argument
128 return position; in getItemId()
131 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
134 Log.d(TAG, "getView() new EffectView position: " + position); in getView()
137 Log.d(TAG, "getView() convertView position: " + position); in getView()
141 ev.set(position); in getView()
[all …]
/frameworks/rs/java/tests/Balls/src/com/example/android/rs/balls/
Dball_physics.rs34 float2 pos = ball->position;
37 gridPos[0] = convert_int2((ball->position / 100.f) /*- 0.4999f*/);
78 float2 vec = touchPos[i] - ball->position;
88 ball->position = ball->position + (ball->delta * gDT);
91 if (ball->position.x > (gMaxPos.x - 20.f)) {
92 float d = gMaxPos.x - ball->position.x;
97 ball->position.x = gMaxPos.x - 1.f;
103 if (ball->position.x < (gMinPos.x + 20.f)) {
104 float d = ball->position.x - gMinPos.x;
109 ball->position.x = gMinPos.x + 1.f;
[all …]

12345678910>>...19