Home
last modified time | relevance | path

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

12345678910>>...33

/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/
DNotificationSectionsLogger.kt39 fun logIncomingHeader(position: Int) = logPosition(position, "INCOMING HEADER") in logIncomingHeader()
40 fun logMediaControls(position: Int) = logPosition(position, "MEDIA CONTROLS") in logIncomingHeader()
41 fun logConversationsHeader(position: Int) = logPosition(position, "CONVERSATIONS HEADER") in logIncomingHeader()
42 fun logAlertingHeader(position: Int) = logPosition(position, "ALERTING HEADER") in logIncomingHeader()
43 fun logSilentHeader(position: Int) = logPosition(position, "SILENT HEADER") in logIncomingHeader()
45 fun logOther(position: Int, clazz: Class<*>) = logBuffer.log( in logIncomingHeader()
49 int1 = position in logIncomingHeader()
55 fun logHeadsUp(position: Int, isHeadsUp: Boolean) = in logHeadsUp()
56 logPosition(position, "Heads Up", isHeadsUp) in logHeadsUp()
57 fun logConversation(position: Int, isHeadsUp: Boolean) = in logHeadsUp()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListHeterogeneous.java39 protected View createView(int position, ViewGroup parent, int desiredHeight) { in createView() argument
40 switch (position % 3) { in createView()
43 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView()
46 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView()
49 position, parent.getContext(), getValueAtPosition(position), desiredHeight); in createView()
56 public View convertView(int position, View convertView, ViewGroup parent) { in convertView() argument
57 switch (position % 3) { in convertView()
59 return ListItemFactory.convertText(convertView, getValueAtPosition(position), position); in convertView()
61 return ListItemFactory.convertButton(convertView, getValueAtPosition(position), in convertView()
62 position); in convertView()
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/
DDividerSnapAlgorithm.java176 public SnapTarget calculateSnapTarget(int position, float velocity) { in calculateSnapTarget() argument
177 return calculateSnapTarget(position, velocity, true /* hardDismiss */); in calculateSnapTarget()
185 public SnapTarget calculateSnapTarget(int position, float velocity, boolean hardDismiss) { in calculateSnapTarget() argument
186 if (position < mFirstSplitTarget.position && velocity < -mMinDismissVelocityPxPerSecond) { in calculateSnapTarget()
189 if (position > mLastSplitTarget.position && velocity > mMinDismissVelocityPxPerSecond) { in calculateSnapTarget()
193 return snap(position, hardDismiss); in calculateSnapTarget()
202 public SnapTarget calculateNonDismissingSnapTarget(int position) { in calculateNonDismissingSnapTarget() argument
203 SnapTarget target = snap(position, false /* hardDismiss */); in calculateNonDismissingSnapTarget()
228 public float calculateDismissingFraction(int position) { in calculateDismissingFraction() argument
229 if (position < mFirstSplitTarget.position) { in calculateDismissingFraction()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/
DListScenario.java86 private boolean isItemAtPositionSelectable(int position) { in isItemAtPositionSelectable() argument
87 return !mUnselectableItems.contains(position); in isItemAtPositionSelectable()
158 int position, double itemScreenSizeFactor) { in setPositionScreenSizeFactorOverride() argument
159 mOverrideItemScreenSizeFactors.put(position, itemScreenSizeFactor); in setPositionScreenSizeFactorOverride()
168 public Params setPositionUnselectable(int position) { in setPositionUnselectable() argument
169 mUnselectableItems.add(position); in setPositionUnselectable()
283 protected void positionClicked(int position) { in positionClicked() argument
284 setClickedPosition(position); in positionClicked()
292 protected void positionLongClicked(int position) { in positionLongClicked() argument
293 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/packages/PrintSpooler/src/com/android/printspooler/ui/
DAddPrinterActivity.java262 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in onItemClick() argument
263 ((ActionAdapter) getListAdapter()).performAction(position); in onItemClick()
275 abstract void performAction(@IntRange(from = 0) int position); in performAction()
334 private @NonNull Pair<ActionAdapter, Integer> getSubAdapter(int position) { in getSubAdapter() argument
339 if (position < adapter.getCount()) { in getSubAdapter()
340 return new Pair<>(adapter, position); in getSubAdapter()
342 position -= adapter.getCount(); in getSubAdapter()
350 public int getItemViewType(int position) { in getItemViewType() argument
357 if (position < adapter.getCount()) { in getItemViewType()
358 return numLowerViewTypes + adapter.getItemViewType(position); in getItemViewType()
[all …]
/frameworks/ex/common/java/com/android/common/widget/
DCompositeCursorAdapter.java242 public int getPartitionForPosition(int position) { in getPartitionForPosition() argument
247 if (position >= start && position < end) { in getPartitionForPosition()
259 public int getOffsetInPartition(int position) { in getOffsetInPartition() argument
264 if (position >= start && position < end) { in getOffsetInPartition()
265 int offset = position - start; in getOffsetInPartition()
281 int position = 0; in getPositionForPartition() local
283 position += mPartitions.get(i).count; in getPositionForPartition()
285 return position; in getPositionForPartition()
306 protected int getItemViewType(int partition, int position) { in getItemViewType() argument
311 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/native/libs/input/tests/
DTfLiteMotionPredictor_test.cpp39 buffers.pushSample(/*timestamp=*/0, {.position = {.x = 100, .y = 100}}); in TEST()
42 buffers.pushSample(/*timestamp=*/1, {.position = {.x = 100, .y = 100}}); in TEST()
46 buffers.pushSample(/*timestamp=*/2, {.position = {.x = 100, .y = 110}}); in TEST()
56 buffers.pushSample(/*timestamp=*/1, {.position = {.x = 100, .y = 200}}); in TEST()
59 buffers.pushSample(/*timestamp=*/2, {.position = {.x = 150, .y = 250}}); in TEST()
62 ASSERT_EQ(buffers.axisFrom().position.x, 100); in TEST()
63 ASSERT_EQ(buffers.axisFrom().position.y, 200); in TEST()
64 ASSERT_EQ(buffers.axisTo().position.x, 150); in TEST()
65 ASSERT_EQ(buffers.axisTo().position.y, 250); in TEST()
68 buffers.pushSample(/*timestamp=*/3, {.position = {.x = 150, .y = 250}}); in TEST()
[all …]
DMotionPredictorMetricsManager_test.cpp65 if (!Matches(Vector2fNear(target.position, epsilon))(arg.position)) {
66 *result_listener << "Position mismatch. Actual: (" << arg.position[0] << ", "
67 << arg.position[1] << "), expected: (" << target.position[0] << ", "
68 << target.position[1] << ")";
139 .x(groundTruthPoint.position[1]) in makeMotionEvent()
140 .y(groundTruthPoint.position[0]) in makeMotionEvent()
154 .x(predictionPoints[0].position[1]) in makeMotionEvent()
155 .y(predictionPoints[0].position[0]) in makeMotionEvent()
166 .x(predictionPoints[i].position[1]) in makeMotionEvent()
167 .y(predictionPoints[i].position[0]) in makeMotionEvent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/complication/
DComplicationLayoutParams.java114 public ComplicationLayoutParams(int width, int height, @Position int position, in ComplicationLayoutParams() argument
116 this(width, height, position, direction, weight, DIRECTIONAL_SPACING_UNSPECIFIED, in ComplicationLayoutParams()
132 public ComplicationLayoutParams(int width, int height, @Position int position, in ComplicationLayoutParams() argument
134 this(width, height, position, direction, weight, directionalSpacing, CONSTRAINT_UNSPECIFIED, in ComplicationLayoutParams()
153 public ComplicationLayoutParams(int width, int height, @Position int position, in ComplicationLayoutParams() argument
155 this(width, height, position, direction, weight, directionalSpacing, constraint, false); in ComplicationLayoutParams()
174 public ComplicationLayoutParams(int width, int height, @Position int position, in ComplicationLayoutParams() argument
176 this(width, height, position, direction, weight, DIRECTIONAL_SPACING_UNSPECIFIED, in ComplicationLayoutParams()
200 public ComplicationLayoutParams(int width, int height, @Position int position, in ComplicationLayoutParams() argument
205 if (!validatePosition(position)) { in ComplicationLayoutParams()
[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/base/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/
DDeviceListAdapter.java53 public DeviceFilterPair<?> getItem(int position) { in getItem() argument
54 return mDevices.get(position); in getItem()
77 public void onBindViewHolder(ViewHolder holder, int position) { in onBindViewHolder() argument
78 holder.itemView.setSelected(mSelectedPosition == position); in onBindViewHolder()
79 holder.mTextView.setText(mDevices.get(position).getDisplayName()); in onBindViewHolder()
80 holder.itemView.setOnClickListener(v -> mListener.onItemClick(position)); in onBindViewHolder()
84 public int getItemViewType(int position) { in getItemViewType() argument
85 return isWifiDevice(position) ? TYPE_WIFI : TYPE_BT; in getItemViewType()
89 public long getItemId(int position) { in getItemId() argument
90 return position; in getItemId()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/management/
DFavoritesModel.kt53 override fun canMoveBefore(position: Int): Boolean { in canMoveBefore()
54 return position > 0 && position < dividerPosition in canMoveBefore()
57 override fun canMoveAfter(position: Int): Boolean { in canMoveAfter()
58 return position >= 0 && position < dividerPosition - 1 in canMoveAfter()
61 override fun moveBefore(position: Int) { in moveBefore()
62 if (!canMoveBefore(position)) { in moveBefore()
63 Log.w(TAG, "Cannot move position $position before") in moveBefore()
65 onMoveItem(position, position - 1) in moveBefore()
69 override fun moveAfter(position: Int) { in moveAfter()
70 if (!canMoveAfter(position)) { in moveAfter()
[all …]
/frameworks/base/core/java/android/widget/
DDropDownListView.java134 final int position = pointToPosition((int) ev.getX(), (int) ev.getY()); in onHoverEvent() local
135 if (position != INVALID_POSITION && position != mSelectedPosition) { in onHoverEvent()
136 final View hoveredItem = getChildAt(position - getFirstVisiblePosition()); in onHoverEvent()
142 positionSelector(position, hoveredItem); in onHoverEvent()
143 setSelectedPositionInt(position); in onHoverEvent()
144 setNextSelectedPositionInt(position); in onHoverEvent()
194 final int position = pointToPosition(x, y); in onForwardedEvent() local
195 if (position == INVALID_POSITION) { in onForwardedEvent()
200 final View child = getChildAt(position - getFirstVisiblePosition()); in onForwardedEvent()
201 setPressedItem(child, position, x, y); in onForwardedEvent()
[all …]
DYearPickerView.java61 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { in YearPickerView()
62 final int year = mAdapter.getYearForPosition(position); in YearPickerView()
90 final int position = mAdapter.getPositionForYear(year); in setYear()
91 if (position >= 0 && position < getCount()) { in setYear()
92 setSelectionCentered(position); in setYear()
98 public void setSelectionCentered(int position) { in setSelectionCentered() argument
100 setSelectionFromTop(position, offset); in setSelectionCentered()
150 public Integer getItem(int position) { in getItem() argument
151 return getYearForPosition(position); in getItem()
155 public long getItemId(int position) { in getItemId() argument
[all …]
DHeaderViewListAdapter.java150 public boolean isEnabled(int position) { in isEnabled() argument
153 if (position < numHeaders) { in isEnabled()
154 return mHeaderViewInfos.get(position).isSelectable; in isEnabled()
158 final int adjPosition = position - numHeaders; in isEnabled()
171 public Object getItem(int position) { in getItem() argument
174 if (position < numHeaders) { in getItem()
175 return mHeaderViewInfos.get(position).data; in getItem()
179 final int adjPosition = position - numHeaders; in getItem()
192 public long getItemId(int position) { in getItemId() argument
194 if (mAdapter != null && position >= numHeaders) { in getItemId()
[all …]
/frameworks/base/core/java/android/preference/
DPreferenceGroupAdapter.java220 public Preference getItem(int position) { in getItem() argument
221 if (position < 0 || position >= getCount()) return null; in getItem()
222 return mPreferenceList.get(position); in getItem()
225 public long getItemId(int position) { in getItemId() argument
226 if (position < 0 || position >= getCount()) return ListView.INVALID_ROW_ID; in getItemId()
227 return this.getItem(position).getId(); in getItemId()
233 public void setHighlighted(int position) { in setHighlighted() argument
234 mHighlightedPosition = position; in setHighlighted()
244 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
245 final Preference preference = this.getItem(position); in getView()
[all …]
/frameworks/libs/systemui/toruslib/torus-math/src/main/java/com/google/android/torus/math/
DAffineTransform.kt25 val position: Vector3 = Vector3(0f, 0f, 0f), constant in com.google.android.torus.math.AffineTransform
32 transform.position,
60 return AffineTransform(position, rotation, Vector3(x, y, z)) in withScale()
82 return AffineTransform(position, RotationQuaternion(rotation), scale) in withRotation()
93 return AffineTransform(position, RotationQuaternion.fromEuler(x, y, z), scale) in withEulerRotation()
97 return AffineTransform(position + Vector3(x, y, z), rotation, scale) in translateBy()
101 return AffineTransform(position, rotation, this.scale + Vector3(scale)) in scaleBy()
105 return AffineTransform(position, rotation, this.scale + Vector3(x, y, z)) in scaleBy()
109 return AffineTransform(position, quaternion * rotation, scale) in rotateBy()
150 Matrix.translateM(transformMatrix, 0, position.x, position.y, position.z) in toMatrix()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
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/setupwizard/library/main/src/com/android/setupwizardlib/items/
DAbstractItemHierarchy.java76 public void notifyItemRangeChanged(int position, int itemCount) { in notifyItemRangeChanged() argument
77 if (position < 0) { in notifyItemRangeChanged()
78 Log.w(TAG, "notifyItemRangeChanged: Invalid position=" + position); in notifyItemRangeChanged()
87 observer.onItemRangeChanged(this, position, itemCount); in notifyItemRangeChanged()
92 public void notifyItemRangeInserted(int position, int itemCount) { in notifyItemRangeInserted() argument
93 if (position < 0) { in notifyItemRangeInserted()
94 Log.w(TAG, "notifyItemRangeInserted: Invalid position=" + position); in notifyItemRangeInserted()
103 observer.onItemRangeInserted(this, position, itemCount); in notifyItemRangeInserted()
128 public void notifyItemRangeRemoved(int position, int itemCount) { in notifyItemRangeRemoved() argument
129 if (position < 0) { in notifyItemRangeRemoved()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/ui/util/
DMediaViewModelListUpdateCallback.kt32 override fun onInserted(position: Int, count: Int) { in onInserted()
33 for (i in position until position + count) { in onInserted()
38 override fun onRemoved(position: Int, count: Int) { in onRemoved()
39 for (i in position until position + count) { in onRemoved()
48 override fun onChanged(position: Int, count: Int, payload: Any?) { in onChanged()
49 for (i in position until position + count) { in onChanged()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/widget/
DFakeListAdapter.kt32 override fun getItem(position: Int): Any = items[position].data
34 override fun getItemId(position: Int): Long = items[position].id
36 override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View =
37 items[position].view(position, convertView, parent)
41 val view: (position: Int, convertView: View?, parent: ViewGroup?) -> View,
/frameworks/base/core/java/com/android/internal/app/
DSuggestedLocaleAdapter.java107 public boolean isEnabled(int position) { in isEnabled() argument
108 return getItemViewType(position) == TYPE_LOCALE in isEnabled()
109 || getItemViewType(position) == TYPE_SYSTEM_LANGUAGE_FOR_APP_LANGUAGE_PICKER in isEnabled()
110 || getItemViewType(position) == TYPE_CURRENT_LOCALE; in isEnabled()
114 public int getItemViewType(int position) { in getItemViewType() argument
116 LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); in getItemViewType()
125 if (position == 0) { in getItemViewType()
128 if (position == mSuggestionCount + 1) { in getItemViewType()
132 LocaleStore.LocaleInfo item = (LocaleStore.LocaleInfo) getItem(position); in getItemViewType()
169 public Object getItem(int position) { in getItem() argument
[all …]
/frameworks/base/core/java/com/android/internal/view/menu/
DMenuAdapter.java65 public MenuItemImpl getItem(int position) { in getItem() argument
68 if (mExpandedIndex >= 0 && position >= mExpandedIndex) { in getItem()
69 position++; in getItem()
71 return items.get(position); in getItem()
74 public long getItemId(int position) { in getItemId() argument
77 return position; in getItemId()
80 public View getView(int position, View convertView, ViewGroup parent) { in getView() argument
85 final int currGroupId = getItem(position).getGroupId(); in getView()
87 position - 1 >= 0 ? getItem(position - 1).getGroupId() : currGroupId; in getView()
97 itemView.initialize(getItem(position), 0); in getView()

12345678910>>...33