Home
last modified time | relevance | path

Searched refs:items (Results 1 – 25 of 152) sorted by relevance

1234567

/frameworks/base/core/java/com/android/internal/view/menu/
DActionMenu.java129 final ArrayList<ActionMenuItem> items = mItems; in findItemIndex() local
130 final int itemCount = items.size(); in findItemIndex()
132 if (items.get(i).getItemId() == id) { in findItemIndex()
149 final ArrayList<ActionMenuItem> items = mItems; in hasVisibleItems() local
150 final int itemCount = items.size(); in hasVisibleItems()
153 if (items.get(i).isVisible()) { in hasVisibleItems()
164 final ArrayList<ActionMenuItem> items = mItems; in findItemWithShortcut() local
165 final int itemCount = items.size(); in findItemWithShortcut()
168 ActionMenuItem item = items.get(i); in findItemWithShortcut()
205 final ArrayList<ActionMenuItem> items = mItems; in removeGroup() local
[all …]
DMenuAdapter.java52 ArrayList<MenuItemImpl> items = mOverflowOnly ? in getCount() local
55 return items.size(); in getCount()
57 return items.size() - 1; in getCount()
65 ArrayList<MenuItemImpl> items = mOverflowOnly ? in getItem() local
70 return items.get(position); in getItem()
95 final ArrayList<MenuItemImpl> items = mAdapterMenu.getNonActionItems(); in findExpandedIndex() local
96 final int count = items.size(); in findExpandedIndex()
98 final MenuItemImpl item = items.get(i); in findExpandedIndex()
DListMenuPresenter.java231 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getCount() local
232 int count = items.size() - mItemIndexOffset; in getCount()
240 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getItem() local
245 return items.get(position); in getItem()
267 final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in findExpandedIndex() local
268 final int count = items.size(); in findExpandedIndex()
270 final MenuItemImpl item = items.get(i); in findExpandedIndex()
/frameworks/base/core/tests/coretests/src/com/android/internal/inputmethod/
DInputMethodSubtypeSwitchingControllerTest.java54 private static void addDummyImeSubtypeListItems(List<ImeSubtypeListItem> items, in addDummyImeSubtypeListItems() argument
80 items.add(new ImeSubtypeListItem(imeName, null /* variableName */, imi, in addDummyImeSubtypeListItems()
85 items.add(new ImeSubtypeListItem(imeName, subtypeLocale, imi, i, subtypeLocale, in addDummyImeSubtypeListItems()
120 final List<ImeSubtypeListItem> items = new ArrayList<>(); in createEnabledImeSubtypes() local
121 addDummyImeSubtypeListItems(items, "LatinIme", "LatinIme", Arrays.asList("en_US", "fr"), in createEnabledImeSubtypes()
123 addDummyImeSubtypeListItems(items, "switchUnawareLatinIme", "switchUnawareLatinIme", in createEnabledImeSubtypes()
126 addDummyImeSubtypeListItems(items, "subtypeUnawareIme", "subtypeUnawareIme", null, in createEnabledImeSubtypes()
128 addDummyImeSubtypeListItems(items, "JapaneseIme", "JapaneseIme", Arrays.asList("ja_JP"), in createEnabledImeSubtypes()
130 addDummyImeSubtypeListItems(items, "switchUnawareJapaneseIme", "switchUnawareJapaneseIme", in createEnabledImeSubtypes()
132 return items; in createEnabledImeSubtypes()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/
DOverflowMenuAdapter.java49 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getCount() local
51 return items.size(); in getCount()
53 return items.size() - 1; in getCount()
58 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getItem() local
62 return items.get(position); in getItem()
88 final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in findExpandedIndex() local
89 final int count = items.size(); in findExpandedIndex()
91 final MenuItemImpl item = items.get(i); in findExpandedIndex()
/frameworks/support/v7/recyclerview/src/android/support/v7/util/
DSortedList.java150 public void addAll(T[] items, boolean mayModifyInput) { in addAll() argument
152 if (items.length == 0) { in addAll()
156 addAllInternal(items); in addAll()
158 T[] copy = (T[]) Array.newInstance(mTClass, items.length); in addAll()
159 System.arraycopy(items, 0, copy, 0, items.length); in addAll()
172 public void addAll(T... items) { in addAll() argument
173 addAll(items, false); in addAll()
183 public void addAll(Collection<T> items) { in addAll() argument
184 T[] copy = (T[]) Array.newInstance(mTClass, items.size()); in addAll()
185 addAll(items.toArray(copy), true); in addAll()
[all …]
/frameworks/support/v7/appcompat/src/android/support/v7/view/menu/
DMenuAdapter.java61 ArrayList<MenuItemImpl> items = mOverflowOnly ? in getCount() local
64 return items.size(); in getCount()
66 return items.size() - 1; in getCount()
75 ArrayList<MenuItemImpl> items = mOverflowOnly ? in getItem() local
80 return items.get(position); in getItem()
107 final ArrayList<MenuItemImpl> items = mAdapterMenu.getNonActionItems(); in findExpandedIndex() local
108 final int count = items.size(); in findExpandedIndex()
110 final MenuItemImpl item = items.get(i); in findExpandedIndex()
DMenuWrapperICS.java83 android.view.MenuItem[] items = null; in addIntentOptions() local
85 items = new android.view.MenuItem[outSpecificItems.length]; in addIntentOptions()
89 .addIntentOptions(groupId, itemId, order, caller, specifics, intent, flags, items); in addIntentOptions()
91 if (items != null) { in addIntentOptions()
92 for (int i = 0, z = items.length; i < z; i++) { in addIntentOptions()
93 outSpecificItems[i] = getMenuItemWrapper(items[i]); in addIntentOptions()
DListMenuPresenter.java239 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getCount() local
240 int count = items.size() - mItemIndexOffset; in getCount()
249 ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in getItem() local
254 return items.get(position); in getItem()
278 final ArrayList<MenuItemImpl> items = mMenu.getNonActionItems(); in findExpandedIndex() local
279 final int count = items.size(); in findExpandedIndex()
281 final MenuItemImpl item = items.get(i); in findExpandedIndex()
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/widget/
DOpReorderTest.java312 List<Item> items = new ArrayList<Item>(itemCount); in process() local
314 items.add(Item.create()); in process()
318 clones.add(Item.clone(items.get(i))); in process()
324 apply(items, mUpdateOps); in process()
335 assertListsIdentical(items, clones); in process()
339 assertRecycledOpsAreNotReused(items); in process()
343 private void assertRecycledOpsAreNotReused(List<Item> items) { in assertRecycledOpsAreNotReused() argument
344 for (Item item : items) { in assertRecycledOpsAreNotReused()
360 private void assertHasTheSameItems(List<Item> items, in assertHasTheSameItems() argument
362 String log = "has the same items\n" + toString(items) + "--\n" + toString(clones); in assertHasTheSameItems()
[all …]
/frameworks/support/paging/common/src/test/java/android/arch/paging/
DKeyedDataSourceTest.kt43 val dataSource = ItemDataSource(items = ITEMS_BY_NAME_ID.subList(0, 1)) in loadInitial_keyMatchesSingleItem()
138 val dataSource = ItemDataSource(items = ArrayList()) in loadInitial_empty()
151 val dataSource = ItemDataSource(items = ArrayList()) in loadInitial_nullKey_empty()
165 val items: List<Item> = ITEMS_BY_NAME_ID) constant in android.arch.paging.KeyedDataSourceTest.ItemDataSource
178 return items.indices.firstOrNull { in findFirstIndexAfter()
179 KEY_COMPARATOR.compare(key, getKey(items[it])) < 0 in findFirstIndexAfter()
180 } ?: items.size in findFirstIndexAfter()
184 return items.indices.reversed().firstOrNull { in findFirstIndexBefore()
185 KEY_COMPARATOR.compare(key, getKey(items[it])) > 0 in findFirstIndexBefore()
202 return items.size - findFirstIndexAfter(key) in countItemsAfter()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DMenu.java31 public List<Item> items; field in Menu
44 items = new ArrayList<Item>(); in Menu()
61 items = new ArrayList<Item>(); in Menu()
65 items.add(item); in Menu()
85 int size = items.size(); in writeToParcel()
88 dest.writeParcelable(items.get(i), flags); in writeToParcel()
/frameworks/base/core/tests/coretests/src/android/metrics/
DLogMakerTest.java281 Object[] items = new Object[2];
282 items[0] = null;
283 items[1] = "foo";
284 new LogMaker(items);
289 Object[] items = new Object[2];
290 items[0] = 10;
291 items[1] = null;
292 new LogMaker(items);
297 Object[] items = new Object[1];
298 items[0] = 10;
[all …]
/frameworks/support/v7/recyclerview/jvm-tests/src/android/support/v7/util/
DSortedListTest.java278 Item[] items = new Item[count]; in createItems() local
283 items[i] = item; in createItems()
286 return items; in createItems()
289 private static Item[] shuffle(Item[] items) { in shuffle() argument
291 final int count = items.length; in shuffle()
296 Item temp = items[pos1]; in shuffle()
297 items[pos1] = items[pos2]; in shuffle()
298 items[pos2] = temp; in shuffle()
301 return items; in shuffle()
468 Item[] items = new Item[maxUniqueId * maxGeneration]; in testAddAllWithDuplicates() local
[all …]
/frameworks/support/compat/tests/java/android/support/v4/app/
DJobIntentServiceTest.java366 TestIntentItem[] items = new TestIntentItem[] { in testEnqueueOne() local
370 for (TestIntentItem item : items) { in testEnqueueOne()
376 compareIntents(items, sFinishedWork); in testEnqueueOne()
387 TestIntentItem[] items = new TestIntentItem[] { in testEnqueueMultiple() local
394 for (TestIntentItem item : items) { in testEnqueueMultiple()
400 compareIntents(items, sFinishedWork); in testEnqueueMultiple()
411 TestIntentItem[] items = new TestIntentItem[] { in testEnqueueSubWork() local
423 for (TestIntentItem item : items) { in testEnqueueSubWork()
429 compareIntents(items, sFinishedWork); in testEnqueueSubWork()
446 TestIntentItem[] items = new TestIntentItem[] { in testStopWhileWorking() local
[all …]
/frameworks/base/core/java/android/metrics/
DLogMaker.java56 public LogMaker(Object[] items) { in LogMaker() argument
57 if (items != null) { in LogMaker()
58 deserialize(items); in LogMaker()
409 public void deserialize(Object[] items) { in deserialize() argument
411 while (items != null && i < items.length) { in deserialize()
412 Object key = items[i++]; in deserialize()
413 Object value = i < items.length ? items[i++] : null; in deserialize()
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DItemInflaterTest.java26 import com.android.setupwizardlib.items.Item;
27 import com.android.setupwizardlib.items.ItemGroup;
28 import com.android.setupwizardlib.items.ItemHierarchy;
29 import com.android.setupwizardlib.items.ItemInflater;
DItemAdapterTest.java28 import com.android.setupwizardlib.items.Item;
29 import com.android.setupwizardlib.items.ItemAdapter;
30 import com.android.setupwizardlib.items.ItemGroup;
31 import com.android.setupwizardlib.items.ItemHierarchy;
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/
DGridWidgetTest.java1898 int[] items = new int[1000]; in testScrollAndRemoveSample1() local
1899 for (int i = 0; i < items.length; i++) { in testScrollAndRemoveSample1()
1900 items[i] = shortItemLength; in testScrollAndRemoveSample1()
1902 items[1] = longItemLength; in testScrollAndRemoveSample1()
1903 testScrollAndRemove(items, 0); in testScrollAndRemoveSample1()
1912 int[] items = new int[1000]; in testScrollAndInsert() local
1913 for (int i = 0; i < items.length; i++) { in testScrollAndInsert()
1914 items[i] = 300 + (int)(Math.random() * 100); in testScrollAndInsert()
1916 intent.putExtra(GridActivity.EXTRA_ITEMS, items); in testScrollAndInsert()
1966 int[] items = new int[1000]; in testScrollAndInsertBeforeVisibleItem() local
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/animation/
DAppearAnimationUtils.java132 private <T> AppearAnimationProperties getDelays(T[] items) { in getDelays() argument
136 mProperties.delays = new long[items.length][]; in getDelays()
137 for (int row = 0; row < items.length; row++) { in getDelays()
141 if (items[row] != null && delay > maxDelay) { in getDelays()
150 private <T> AppearAnimationProperties getDelays(T[][] items) { in getDelays() argument
154 mProperties.delays = new long[items.length][]; in getDelays()
155 for (int row = 0; row < items.length; row++) { in getDelays()
156 T[] columns = items[row]; in getDelays()
161 if (items[row][col] != null && delay > maxDelay) { in getDelays()
/frameworks/base/core/tests/coretests/src/android/widget/
DListViewTest.java46 List<String> items = Lists.newArrayList("hello"); in testRequestLayout() local
47 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testRequestLayout()
76 List<String> items = Lists.newArrayList("hello"); in testNoSelectableItems() local
77 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testNoSelectableItems()
88 items.remove(0); in testNoSelectableItems()
/frameworks/base/core/java/android/view/
DKeyboardShortcutGroup.java44 @NonNull List<KeyboardShortcutInfo> items) { in KeyboardShortcutGroup() argument
46 mItems = new ArrayList<>(checkNotNull(items)); in KeyboardShortcutGroup()
64 @NonNull List<KeyboardShortcutInfo> items, boolean isSystemGroup) { in KeyboardShortcutGroup() argument
66 mItems = new ArrayList<>(checkNotNull(items)); in KeyboardShortcutGroup()
/frameworks/support/paging/integration-tests/testapp/src/main/java/android/arch/paging/integration/testapp/
DItemDataSource.java54 List<Item> items = new ArrayList<>(); in loadRange() local
64 items.add(new Item(i, "item " + i, bgColor)); in loadRange()
71 return items; in loadRange()
/frameworks/base/core/tests/coretests/src/android/database/
DDatabaseLocaleTest.java69 ArrayList<String> items = new ArrayList<String>(); in query() local
71 items.add(c.getString(0)); in query()
74 String[] result = items.toArray(new String[items.size()]); in query()
/frameworks/av/media/libmedia/
DIResourceManagerService.cpp39 static void writeToParcel(Parcel *data, const Vector<T> &items) { in writeToParcel() argument
40 size_t size = items.size(); in writeToParcel()
44 items[i].writeToParcel(data); in writeToParcel()
49 static void readFromParcel(const Parcel &data, Vector<T> *items) { in readFromParcel() argument
54 items->add(item); in readFromParcel()

1234567