Home
last modified time | relevance | path

Searched refs:adapter (Results 1 – 25 of 262) sorted by relevance

1234567891011

/packages/apps/Contacts/tests/src/com/android/contacts/widget/
DCompositeListAdapterTest.java114 CompositeListAdapter adapter = new CompositeListAdapter(); in testGetCount() local
115 adapter.addAdapter(mAdapter1); in testGetCount()
116 adapter.addAdapter(mAdapter2); in testGetCount()
117 adapter.addAdapter(mAdapter3); in testGetCount()
119 assertEquals(5, adapter.getCount()); in testGetCount()
123 CompositeListAdapter adapter = new CompositeListAdapter(); in testGetCountWithInvalidation() local
124 assertEquals(0, adapter.getCount()); in testGetCountWithInvalidation()
126 adapter.addAdapter(mAdapter1); in testGetCountWithInvalidation()
127 assertEquals(2, adapter.getCount()); in testGetCountWithInvalidation()
129 adapter.addAdapter(mAdapter2); in testGetCountWithInvalidation()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/manageapplications/
DManageApplicationsTest.java193 final ManageApplications.ApplicationsAdapter adapter = in onQueryTextChange_shouldFilterSearchInApplicationsAdapter() local
196 ReflectionHelpers.setField(mFragment, "mApplications", adapter); in onQueryTextChange_shouldFilterSearchInApplicationsAdapter()
200 verify(adapter).filterSearch(query); in onQueryTextChange_shouldFilterSearchInApplicationsAdapter()
206 final ManageApplications.ApplicationsAdapter adapter = in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer() local
211 ReflectionHelpers.setField(adapter, "mLoadingViewController", loadingViewController); in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer()
214 ReflectionHelpers.setField(adapter, "mHasReceivedLoadEntries", true); in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer()
219 adapter.updateLoading(); in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer()
227 final ManageApplications.ApplicationsAdapter adapter = in updateLoading_appNotLoaded_shouldDelayCallToHandleLoadingContainer() local
232 ReflectionHelpers.setField(adapter, "mLoadingViewController", loadingViewController); in updateLoading_appNotLoaded_shouldDelayCallToHandleLoadingContainer()
235 ReflectionHelpers.setField(adapter, "mHasReceivedLoadEntries", false); in updateLoading_appNotLoaded_shouldDelayCallToHandleLoadingContainer()
[all …]
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/androidTest/java/com/android/car/ui/recyclerview/
DCarUiRecyclerViewTest.java216 TestAdapter adapter = new TestAdapter(4); in testGridLayout() local
219 carUiRecyclerView.setAdapter(adapter); in testGridLayout()
225 onView(withText(adapter.getItemText(0))).check( in testGridLayout()
226 isTopAlignedWith(withText(adapter.getItemText(1)))); in testGridLayout()
227 onView(withText(adapter.getItemText(1))).check( in testGridLayout()
228 isTopAlignedWith(withText(adapter.getItemText(2)))); in testGridLayout()
231 onView(withText(adapter.getItemText(0))).check( in testGridLayout()
232 isBottomAlignedWith(withText(adapter.getItemText(1)))); in testGridLayout()
233 onView(withText(adapter.getItemText(1))).check( in testGridLayout()
234 isBottomAlignedWith(withText(adapter.getItemText(2)))); in testGridLayout()
[all …]
DRangeFilterImplTest.java187 Adapter adapter, in verifyFilterBothEnds() argument
196 verify(adapter).notifyItemInserted(unrestrictedCount); in verifyFilterBothEnds()
197 verify(adapter).notifyItemRangeRemoved( in verifyFilterBothEnds()
199 verify(adapter).notifyItemRangeRemoved(0, clampedHeadItemCount); in verifyFilterBothEnds()
200 verify(adapter).notifyItemInserted(0); in verifyFilterBothEnds()
204 Adapter adapter, in verifyRemoveFilterBothEnds() argument
213 verify(adapter).notifyItemRemoved(maxCount + 1); in verifyRemoveFilterBothEnds()
214 verify(adapter).notifyItemRangeInserted(maxCount + 1, clampedTailItemCount); in verifyRemoveFilterBothEnds()
215 verify(adapter).notifyItemRangeInserted(1, clampedHeadItemCount); in verifyRemoveFilterBothEnds()
216 verify(adapter).notifyItemRemoved(0); in verifyRemoveFilterBothEnds()
/packages/apps/Contacts/src/com/android/contacts/list/
DPhoneNumberPickerFragment.java176 final PhoneNumberListAdapter adapter = (PhoneNumberListAdapter) getAdapter(); in getPhoneNumber() local
177 return adapter.getPhoneNumber(position); in getPhoneNumber()
181 final PhoneNumberListAdapter adapter = (PhoneNumberListAdapter) getAdapter(); in getPhoneUri() local
182 return adapter.getDataUri(position); in getPhoneUri()
186 final PhoneNumberListAdapter adapter = (PhoneNumberListAdapter) getAdapter(); in getLookupKey() local
187 return adapter.getLookupKey(position); in getLookupKey()
214 PhoneNumberListAdapter adapter = new PhoneNumberListAdapter(getActivity()); in createListAdapter() local
215 adapter.setDisplayPhotos(true); in createListAdapter()
216 adapter.setUseCallableUri(mUseCallableUri); in createListAdapter()
217 return adapter; in createListAdapter()
[all …]
DPostalAddressPickerFragment.java50 PostalAddressListAdapter adapter = (PostalAddressListAdapter)getAdapter(); in onItemClick() local
51 pickPostalAddress(adapter.getDataUri(position)); in onItemClick()
53 LegacyPostalAddressListAdapter adapter = (LegacyPostalAddressListAdapter)getAdapter(); in onItemClick() local
54 pickPostalAddress(adapter.getContactMethodUri(position)); in onItemClick()
61 PostalAddressListAdapter adapter = new PostalAddressListAdapter(getActivity()); in createListAdapter() local
62 adapter.setSectionHeaderDisplayEnabled(true); in createListAdapter()
63 adapter.setDisplayPhotos(true); in createListAdapter()
64 return adapter; in createListAdapter()
66 LegacyPostalAddressListAdapter adapter = in createListAdapter() local
68 adapter.setSectionHeaderDisplayEnabled(false); in createListAdapter()
[all …]
DContactPickerFragment.java136 HeaderEntryContactListAdapter adapter in createListAdapter() local
138 adapter.setFilter(ContactListFilter.createFilterWithType( in createListAdapter()
140 adapter.setSectionHeaderDisplayEnabled(true); in createListAdapter()
141 adapter.setDisplayPhotos(true); in createListAdapter()
142 adapter.setQuickContactEnabled(false); in createListAdapter()
143 adapter.setShowCreateContact(mCreateContactEnabled); in createListAdapter()
144 return adapter; in createListAdapter()
146 LegacyContactListAdapter adapter = new LegacyContactListAdapter(getActivity()); in createListAdapter() local
147 adapter.setSectionHeaderDisplayEnabled(false); in createListAdapter()
148 adapter.setDisplayPhotos(false); in createListAdapter()
[all …]
DContactBrowseListFragment.java337 ContactListAdapter adapter = getAdapter(); in setSelectedContactUri() local
338 if (adapter != null) { in setSelectedContactUri()
339 adapter.setSelectedContact(mSelectedContactDirectoryId, in setSelectedContactUri()
388 ContactListAdapter adapter = getAdapter(); in configureAdapter() local
389 if (adapter == null) { in configureAdapter()
395 adapter.setFilter(mFilter); in configureAdapter()
398 adapter.setSelectedContact( in configureAdapter()
403 adapter.setIncludeFavorites(!searchMode && mFilter.isContactsFilterType()); in configureAdapter()
432 ContactListAdapter adapter = getAdapter(); in checkSelection() local
433 if (adapter == null) { in checkSelection()
[all …]
DJoinContactListFragment.java63 JoinContactListAdapter adapter = getAdapter();
64 if (adapter != null) {
65 adapter.configureLoader(loader, 0);
125 JoinContactListAdapter adapter = getAdapter(); in onContactListLoaded() local
126 adapter.setSuggestionsCursor(suggestionsCursor); in onContactListLoaded()
146 JoinContactListAdapter adapter = new JoinContactListAdapter(getActivity()); in createListAdapter() local
147 adapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(false /* opposite */)); in createListAdapter()
148 return adapter; in createListAdapter()
154 JoinContactListAdapter adapter = getAdapter(); in configureAdapter() local
155 adapter.setTargetContactId(mTargetContactId); in configureAdapter()
DLegacyPhoneNumberPickerFragment.java36 final LegacyPhoneNumberListAdapter adapter = (LegacyPhoneNumberListAdapter) getAdapter(); in getPhoneUri() local
37 return adapter.getPhoneUri(position); in getPhoneUri()
48 LegacyPhoneNumberListAdapter adapter = new LegacyPhoneNumberListAdapter(getActivity()); in createListAdapter() local
49 adapter.setDisplayPhotos(true); in createListAdapter()
50 return adapter; in createListAdapter()
54 protected void setPhotoPosition(ContactEntryListAdapter adapter) { in setPhotoPosition() argument
DEmailAddressPickerFragment.java44 EmailAddressListAdapter adapter = (EmailAddressListAdapter)getAdapter(); in onItemClick() local
48 pickEmailAddress(adapter.getDataUri(position)); in onItemClick()
53 EmailAddressListAdapter adapter = new EmailAddressListAdapter(getActivity()); in createListAdapter() local
54 adapter.setSectionHeaderDisplayEnabled(true); in createListAdapter()
55 adapter.setDisplayPhotos(true); in createListAdapter()
56 return adapter; in createListAdapter()
/packages/apps/Settings/tests/robotests/src/com/android/settings/panel/
DPanelSlicesAdapterTest.java117 final PanelSlicesAdapter adapter = in sizeOfAdapter_shouldNotExceedMaxNum() local
121 adapter.onCreateViewHolder(view, 0); in sizeOfAdapter_shouldNotExceedMaxNum()
123 assertThat(adapter.getItemCount()).isEqualTo(MAX_NUM_OF_SLICES); in sizeOfAdapter_shouldNotExceedMaxNum()
124 assertThat(adapter.getData().size()).isEqualTo(MAX_NUM_OF_SLICES); in sizeOfAdapter_shouldNotExceedMaxNum()
131 final PanelSlicesAdapter adapter = in mediaOutputIndicatorSlice_shouldNotAllowDividerAbove() local
136 adapter.onCreateViewHolder(view, 0 /* view type*/); in mediaOutputIndicatorSlice_shouldNotAllowDividerAbove()
138 adapter.onBindViewHolder(viewHolder, position); in mediaOutputIndicatorSlice_shouldNotAllowDividerAbove()
148 final PanelSlicesAdapter adapter = in sliderPanelType_shouldAllowDividerBelow() local
153 adapter.onCreateViewHolder(view, PanelContent.VIEW_TYPE_SLIDER); in sliderPanelType_shouldAllowDividerBelow()
154 adapter.onBindViewHolder(viewHolder, position); in sliderPanelType_shouldAllowDividerBelow()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/timezone/
DBaseTimeZoneAdapterTest.java49 TestTimeZoneAdapter adapter = new TestTimeZoneAdapter(items); in testFilter() local
50 assertSearch(adapter, "", items.toArray(new TestItem[0])); in testFilter()
51 assertSearch(adapter, "Unit", US, UK); in testFilter()
52 assertSearch(adapter, "kon", HK); in testFilter()
53 assertSearch(adapter, "brit", UK); in testFilter()
54 assertSearch(adapter, "sec", secretCountry); in testFilter()
57 private void assertSearch(TestTimeZoneAdapter adapter , String searchText, TestItem... items) in assertSearch() argument
59 Observer observer = new Observer(adapter); in assertSearch()
60 adapter.getFilter().filter(searchText); in assertSearch()
62 assertThat(adapter.getItemCount()).isEqualTo(items.length); in assertSearch()
[all …]
DRegionSearchPickerTest.java67 BaseTimeZoneAdapter adapter = picker.createAdapter(new TimeZoneData(finder)); in createAdapter_matchRegionName() local
68 assertEquals(1, adapter.getItemCount()); in createAdapter_matchRegionName()
69 AdapterItem item = adapter.getDataItem(0); in createAdapter_matchRegionName()
87 BaseTimeZoneAdapter<RegionItem> adapter = picker.createAdapter(new TimeZoneData(finder)); in clickItemView_duringRegionSearch_shouldNotCrash() local
89 ItemViewHolder viewHolder = (ItemViewHolder) adapter.onCreateViewHolder( in clickItemView_duringRegionSearch_shouldNotCrash()
91 adapter.onBindViewHolder(viewHolder, 0); in clickItemView_duringRegionSearch_shouldNotCrash()
92 assertEquals(1, adapter.getItemCount()); in clickItemView_duringRegionSearch_shouldNotCrash()
95 FilterWrapper filterWrapper = new FilterWrapper(adapter.getFilter()); in clickItemView_duringRegionSearch_shouldNotCrash()
99 assertEquals(0, adapter.getItemCount()); in clickItemView_duringRegionSearch_shouldNotCrash()
/packages/apps/Gallery2/src/com/android/photos/views/
DHeaderGridView.java81 ListAdapter adapter = getAdapter(); in onMeasure() local
82 if (adapter != null && adapter instanceof HeaderViewGridAdapter) { in onMeasure()
83 ((HeaderViewGridAdapter) adapter).setNumColumns(getNumColumns()); in onMeasure()
105 ListAdapter adapter = getAdapter(); in addHeaderView() local
107 if (adapter != null && ! (adapter instanceof HeaderViewGridAdapter)) { in addHeaderView()
123 if (adapter != null) { in addHeaderView()
124 ((HeaderViewGridAdapter) adapter).notifyDataSetChanged(); in addHeaderView()
156 ListAdapter adapter = getAdapter(); in removeHeaderView() local
157 if (adapter != null && ((HeaderViewGridAdapter) adapter).removeHeader(v)) { in removeHeaderView()
178 public void setAdapter(ListAdapter adapter) { in setAdapter() argument
[all …]
/packages/apps/Dialer/java/com/android/dialer/speeddial/draghelper/
DSpeedDialItemTouchHelperCallback.java32 private final ItemTouchHelperAdapter adapter; field in SpeedDialItemTouchHelperCallback
41 public SpeedDialItemTouchHelperCallback(Context context, ItemTouchHelperAdapter adapter) { in SpeedDialItemTouchHelperCallback() argument
43 this.adapter = adapter; in SpeedDialItemTouchHelperCallback()
61 return adapter.canDropOver(target); in canDropOver()
66 if (!adapter.canDropOver(viewHolder)) { in getMovementFlags()
84 adapter.enterRemoveView(); in onMove()
92 adapter.leaveRemoveView(); in onMove()
94 adapter.onItemMove(viewHolder.getAdapterPosition(), target.getAdapterPosition()); in onMove()
125 adapter.dropOnRemoveView(viewHolder); in onChildDraw()
131 adapter.leaveRemoveView(); in onChildDraw()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/calling/
DListWithEntrySummaryPreferenceTest.java67 ListAdapter adapter = dialog.getListView().getAdapter(); in initialize_defaultEntries_shouldDisplayDefaultEntries() local
70 assertThat(adapter.getCount()).isEqualTo(len); in initialize_defaultEntries_shouldDisplayDefaultEntries()
72 TextView title = adapter.getView(i, null, null).findViewById(R.id.title); in initialize_defaultEntries_shouldDisplayDefaultEntries()
73 TextView summary = adapter.getView(i, null, null).findViewById(R.id.summary); in initialize_defaultEntries_shouldDisplayDefaultEntries()
86 ListAdapter adapter = dialog.getListView().getAdapter(); in setEntries_customEntries_shouldUpdateEntries() local
89 assertThat(adapter.getCount()).isEqualTo(len); in setEntries_customEntries_shouldUpdateEntries()
91 TextView title = adapter.getView(i, null, null).findViewById(R.id.title); in setEntries_customEntries_shouldUpdateEntries()
92 TextView summary = adapter.getView(i, null, null).findViewById(R.id.summary); in setEntries_customEntries_shouldUpdateEntries()
111 ListAdapter adapter = dialog.getListView().getAdapter(); in onSaveAndRestoreInstanceState_resumePreference_shouldNotChangeEntries() local
114 assertThat(adapter.getCount()).isEqualTo(len); in onSaveAndRestoreInstanceState_resumePreference_shouldNotChangeEntries()
[all …]
/packages/apps/Dialer/java/com/android/dialer/app/list/
DListsFragment.java69 private DialtactsPagerAdapter adapter; field in ListsFragment
128 currentPage = adapter.getItem(viewPager.getCurrentItem()); in onResume()
199 adapter = in onCreateView()
205 viewPager.setAdapter(adapter); in onCreateView()
255 if (adapter.hasActiveVoicemailProvider()) { in showTab()
256 viewPager.setCurrentItem(adapter.getRtlPosition(DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL)); in showTab()
262 viewPager.setCurrentItem(adapter.getRtlPosition(index)); in showTab()
273 tabIndex = adapter.getRtlPosition(position); in onPageScrolled()
296 tabIndex = adapter.getRtlPosition(position); in onPageSelected()
310 currentPage = adapter.getItem(position); in onPageSelected()
[all …]
/packages/apps/Dialer/java/com/android/dialer/app/calllog/
DCallLogFragment.java117 private CallLogAdapter adapter; field in CallLogFragment
126 if (adapter != null) {
127 adapter.notifyDataSetChanged();
235 adapter.invalidatePositions(); in onCallsFetched()
236 adapter.setLoading(false); in onCallsFetched()
237 adapter.changeCursor(cursor); in onCallsFetched()
340 adapter = in setupData()
356 recyclerView.setAdapter(adapter); in setupData()
357 if (adapter.getOnScrollListener() != null) { in setupData()
358 recyclerView.addOnScrollListener(adapter.getOnScrollListener()); in setupData()
[all …]
DCallLogAlertManager.java30 private final CallLogAdapter adapter; field in CallLogAlertManager
36 public CallLogAlertManager(CallLogAdapter adapter, LayoutInflater inflater, ViewGroup parent) { in CallLogAlertManager() argument
37 this.adapter = adapter; in CallLogAlertManager()
67 adapter.notifyItemRemoved(CallLogAdapter.ALERT_POSITION); in clear()
78 adapter.notifyItemInserted(CallLogAdapter.ALERT_POSITION); in add()
DBlockReportSpamListener.java44 private final RecyclerView.Adapter adapter; field in BlockReportSpamListener
54 RecyclerView.Adapter adapter, in BlockReportSpamListener() argument
59 this.adapter = adapter; in BlockReportSpamListener()
94 adapter.notifyDataSetChanged(); in onBlockReportSpam()
135 adapter.notifyDataSetChanged(); in onBlock()
173 adapter.notifyDataSetChanged(); in onUnblock()
202 adapter.notifyDataSetChanged(); in onReportNotSpam()
/packages/apps/Dialer/java/com/android/dialer/searchfragment/list/
DNewSearchFragment.java112 private SearchAdapter adapter; field in NewSearchFragment
141 private final Runnable capabilitiesUpdatedRunnable = () -> adapter.notifyDataSetChanged();
154 adapter = new SearchAdapter(getContext(), new SearchCursorManager(), this); in onCreateView()
155 adapter.setQuery(query, rawNumber); in onCreateView()
156 adapter.setSearchActions(getActions()); in onCreateView()
162 recyclerView.setAdapter(adapter); in onCreateView()
231 adapter.setContactsCursor((SearchCursor) cursor); in onLoadFinished()
234 adapter.setNearbyPlacesCursor((SearchCursor) cursor); in onLoadFinished()
237 adapter.setDirectoryContactsCursor((SearchCursor) cursor); in onLoadFinished()
254 adapter.setContactsCursor(null); in onLoaderReset()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
DClusteredSuggestionsView.java36 public void setSuggestionsAdapter(SuggestionsAdapter<ExpandableListAdapter> adapter) { in setSuggestionsAdapter() argument
37 mSuggestionsAdapter = adapter; in setSuggestionsAdapter()
38 super.setAdapter(adapter == null ? null : adapter.getListAdapter()); in setSuggestionsAdapter()
63 ExpandableListAdapter adapter = mSuggestionsAdapter.getListAdapter(); in expandAll() local
64 for (int i = 0; i < adapter.getGroupCount(); ++i) { in expandAll()
/packages/apps/TV/src/com/android/tv/menu/
DItemListRow.java36 ItemListAdapter adapter) { in ItemListRow() argument
37 this(context, menu, context.getString(titleResId), itemHeightResId, adapter); in ItemListRow()
45 ItemListAdapter adapter) { in ItemListRow() argument
47 mAdapter = adapter; in ItemListRow()
55 public void setAdapter(ItemListAdapter<?> adapter) { in setAdapter() argument
56 mAdapter = adapter; in setAdapter()
/packages/apps/Dialer/java/com/android/dialer/contactsfragment/
DFastScroller.java34 private ContactsAdapter adapter; field in FastScroller
55 void setup(ContactsAdapter adapter, LinearLayoutManager layoutManager) { in setup() argument
56 this.adapter = adapter; in setup()
94 final int itemCount = adapter.getItemCount(); in setRecyclerViewPosition()
98 container.setText(adapter.getHeaderString(targetPos)); in setRecyclerViewPosition()
99 adapter.refreshHeaders(); in setRecyclerViewPosition()

1234567891011