Home
last modified time | relevance | path

Searched refs:mAdapter (Results 1 – 25 of 202) sorted by relevance

123456789

/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/ui/
DSortedArrayAdapterTest.java45 private TestSortedArrayAdapter mAdapter; field in SortedArrayAdapterTest
49 mAdapter = new TestSortedArrayAdapter(Integer.MAX_VALUE, null); in setUp()
59 mAdapter.add(P1); in testAdd_one()
61 assertContentsInOrder(mAdapter, P1); in testAdd_one()
66 mAdapter.add(P1); in testAdd_two()
67 mAdapter.add(P2); in testAdd_two()
69 assertContentsInOrder(mAdapter, P2, P1); in testAdd_two()
74 mAdapter.setInitialItems(Arrays.asList(P1, P2)); in testSetInitialItems_two()
76 assertContentsInOrder(mAdapter, P2, P1); in testSetInitialItems_two()
81 mAdapter = new TestSortedArrayAdapter(1, null); in testMaxInitialCount()
[all …]
/packages/apps/Gallery2/src/com/android/photos/views/
DHeaderGridView.java220 private final ListAdapter mAdapter; field in HeaderGridView.HeaderViewGridAdapter
231 mAdapter = adapter; in HeaderViewGridAdapter()
248 return (mAdapter == null || mAdapter.isEmpty()) && getHeadersCount() == 0; in isEmpty()
290 if (mAdapter != null) { in getCount()
291 return getHeadersCount() * mNumColumns + mAdapter.getCount(); in getCount()
299 if (mAdapter != null) { in areAllItemsEnabled()
300 return mAreAllFixedViewsSelectable && mAdapter.areAllItemsEnabled(); in areAllItemsEnabled()
318 if (mAdapter != null) { in isEnabled()
319 adapterCount = mAdapter.getCount(); in isEnabled()
321 return mAdapter.isEnabled(adjPosition); in isEnabled()
[all …]
/packages/apps/Contacts/src/com/android/contacts/list/
DContactEntryListFragment.java121 private T mAdapter; field in ContactEntryListFragment
219 if (mAdapter != null) { in setEnabled()
223 mAdapter.clearPartitions(); in setEnabled()
242 return mAdapter; in getAdapter()
283 mAdapter = createListAdapter(); in onCreate()
326 if (mAdapter == null) { in startLoading()
332 int partitionCount = mAdapter.getPartitionCount(); in startLoading()
334 Partition partition = mAdapter.getPartition(i); in startLoading()
355 loader.setDirectorySearchMode(mAdapter.getDirectorySearchMode()); in onCreateLoader()
364 mAdapter.configureLoader(loader, directoryId); in onCreateLoader()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/
DCategoryPanel.java39 private CategoryAdapter mAdapter; field in CategoryPanel
56 mAdapter = activity.getCategoryLooksAdapter(); in loadAdapter()
57 if (mAdapter != null) { in loadAdapter()
58 mAdapter.initializeSelection(MainPanel.LOOKS); in loadAdapter()
64 mAdapter = activity.getCategoryBordersAdapter(); in loadAdapter()
65 if (mAdapter != null) { in loadAdapter()
66 mAdapter.initializeSelection(MainPanel.BORDERS); in loadAdapter()
72 mAdapter = activity.getCategoryGeometryAdapter(); in loadAdapter()
73 if (mAdapter != null) { in loadAdapter()
74 mAdapter.initializeSelection(MainPanel.GEOMETRY); in loadAdapter()
[all …]
DCategoryTrack.java32 private CategoryAdapter mAdapter; field in CategoryTrack
40 if (getChildCount() != mAdapter.getCount()) {
60 mAdapter = adapter; in setAdapter()
61 mAdapter.registerDataSetObserver(mDataSetObserver); in setAdapter()
67 mAdapter.setItemWidth(mElemSize); in fillContent()
68 mAdapter.setItemHeight(LayoutParams.MATCH_PARENT); in fillContent()
69 int n = mAdapter.getCount(); in fillContent()
71 View view = mAdapter.getView(i, null, this); in fillContent()
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/
DHighlightablePreferenceGroupAdapterTest.java66 private HighlightablePreferenceGroupAdapter mAdapter; field in HighlightablePreferenceGroupAdapterTest
74 mAdapter = spy(new HighlightablePreferenceGroupAdapter(mPreferenceCatetory, TEST_KEY, in setUp()
82 mAdapter.requestHighlight(mRoot, mock(RecyclerView.class)); in requestHighlight_hasKey_notHighlightedBefore_shouldRequest()
90 ReflectionHelpers.setField(mAdapter, "mHighlightKey", null); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest()
91 ReflectionHelpers.setField(mAdapter, "mHighlightRequested", false); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest()
92 mAdapter.requestHighlight(mRoot, mock(RecyclerView.class)); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest()
94 ReflectionHelpers.setField(mAdapter, "mHighlightKey", TEST_KEY); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest()
95 ReflectionHelpers.setField(mAdapter, "mHighlightRequested", true); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest()
96 mAdapter.requestHighlight(mRoot, mock(RecyclerView.class)); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest()
98 ReflectionHelpers.setField(mAdapter, "mHighlightKey", TEST_KEY); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest()
[all …]
/packages/apps/Camera2/src/com/android/camera/data/
DFilmstripDataAdapterProxy.java40 protected final LocalFilmstripDataAdapter mAdapter; field in FilmstripDataAdapterProxy
56 mAdapter = wrappedAdapter; in FilmstripDataAdapterProxy()
63 mAdapter.suggestViewSizeBound(w, h); in suggestViewSizeBound()
68 mAdapter.setListener(listener); in setListener()
73 mAdapter.setLocalDataListener(listener); in setLocalDataListener()
78 mAdapter.requestLoad(onDone); in requestLoad()
83 mAdapter.requestLoadNewPhotos(); in requestLoadNewPhotos()
88 return mAdapter.addOrUpdate(item); in addOrUpdate()
93 mAdapter.clear(); in clear()
98 return mAdapter.executeDeletion(); in executeDeletion()
[all …]
DFixedLastProxyAdapter.java62 int totalNumber = mAdapter.getTotalNumber(); in getItemAt()
65 return mAdapter.getItemAt(index); in getItemAt()
74 if (index < mAdapter.getTotalNumber()) { in removeAt()
75 mAdapter.removeAt(index); in removeAt()
81 return mAdapter.findByContentUri(uri); in findByContentUri()
86 int totalNumber = mAdapter.getTotalNumber(); in updateItemAt()
89 mAdapter.updateItemAt(pos, item); in updateItemAt()
110 return mAdapter.getTotalNumber() + 1; in getTotalNumber()
115 int totalNumber = mAdapter.getTotalNumber(); in getView()
118 return mAdapter.getView(recycled, index, videoClickedCallback); in getView()
[all …]
DFixedFirstProxyAdapter.java66 return mAdapter.getItemAt(index - 1); in getItemAt()
72 mAdapter.removeAt(index - 1); in removeAt()
78 int pos = mAdapter.findByContentUri(uri); in findByContentUri()
103 mAdapter.updateItemAt(pos - 1, item); in updateItemAt()
109 return (mAdapter.getTotalNumber() + 1); in getTotalNumber()
119 return mAdapter.getView(recycled, index - 1, videoClickedCallback); in getView()
127 return mAdapter.getItemViewType(index); in getItemViewType()
135 return mAdapter.getFilmstripItemAt(index - 1); in getFilmstripItemAt()
141 mAdapter.setListener((listener == null) ? null : this); in setListener()
195 return mAdapter.updateMetadataAt(index - 1); in updateMetadataAt()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/
DContextualCardsAdapterTest.java59 private ContextualCardsAdapter mAdapter; field in ContextualCardsAdapterTest
71 mAdapter = new ContextualCardsAdapter(mActivity, fragment, mManager); in setUp()
76 mAdapter.mContextualCards.addAll(getContextualCardList()); in getItemViewType_sliceFullWidth_shouldReturnSliceFullWidthViewType()
78 final int viewType = mAdapter.getItemViewType(1); in getItemViewType_sliceFullWidth_shouldReturnSliceFullWidthViewType()
86 mAdapter.mContextualCards.addAll(cards); in getItemCount_cardList_shouldReturnListSize()
88 final int count = mAdapter.getItemCount(); in getItemCount_cardList_shouldReturnListSize()
98 final RecyclerView.ViewHolder holder = mAdapter.onCreateViewHolder(recyclerView, in onCreateViewHolder_conditionalCard_shouldReturnConditionalCardHolder()
106 mAdapter.mContextualCards.add(buildConditionContextualCard()); in onBindViewHolder_conditionalCard_shouldSetTestTitle()
113 mAdapter.onBindViewHolder(holder, 0); in onBindViewHolder_conditionalCard_shouldSetTestTitle()
120 mAdapter.mContextualCards.addAll(getContextualCardList()); in onContextualCardUpdated_emptyList_shouldClearCardList()
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/dirlist/
DDirectoryAddonsAdapterTest.java44 private DirectoryAddonsAdapter mAdapter; field in DirectoryAddonsAdapterTest
56 mAdapter = new DirectoryAddonsAdapter( in setUp()
61 mEnv.model.addUpdateListener(mAdapter.getModelUpdateListener()); in setUp()
68 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testItemCount_mixed()
76 assertEquals(0, mAdapter.getPosition(ModelId.build(AUTHORITY, "1"))); in testGetPosition()
79 assertEquals(2, mAdapter.getPosition(ModelId.build(AUTHORITY, "2"))); in testGetPosition()
89 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount_allDirs()
99 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount_allFiles()
111 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testAddsInfoMessage_WithDirectoryChildren()
117 assertEquals(1, mAdapter.getItemCount()); in testItemCount_none()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/dialog/old/
DBaseActionFragment.java57 private ActionAdapter mAdapter; field in BaseActionFragment
102 mAdapter = new ActionAdapter(mFragment.getActivity()); in onCreate()
109 mAdapter.addAction(action); in onCreate()
126 mAdapter.setListener(this); in onCreate()
127 mAdapter.setOnFocusListener(this); in onCreate()
128 mAdapter.setOnKeyListener(this); in onCreate()
135 sav.addOnScrollListener(mAdapter); in onResume()
136 if (getAdapter() != mAdapter) { in onResume()
137 mAdapter.setScrollAdapterView(sav); in onResume()
138 setAdapter(mAdapter); in onResume()
[all …]
/packages/apps/Car/Notification/src/com/android/car/notification/
DCarNotificationView.java30 private CarNotificationViewAdapter mAdapter; field in CarNotificationView
57 mAdapter = new CarNotificationViewAdapter(mContext, /* isGroupNotificationAdapter= */ in onFinishInflate()
59 listView.setAdapter(mAdapter); in onFinishInflate()
62 listView.addOnItemTouchListener(new CarNotificationItemTouchListener(mContext, mAdapter)); in onFinishInflate()
66 clearAllButton.setOnClickListener(view -> mAdapter.clearAllNotifications()); in onFinishInflate()
86 mAdapter.setNotifications(notifications, /* setRecyclerViewListHeaderAndFooter= */ true); in setNotifications()
93 mAdapter.collapseAllGroups(); in collapseAllGroups()
98 mAdapter.setCarUxRestrictions(restrictionInfo); in onUxRestrictionsChanged()
107 mAdapter.setClickHandlerFactory(clickHandlerFactory); in setClickHandlerFactory()
118 mAdapter.setNotificationDataManager(notificationDataManager); in setNotificationDataManager()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/
DHorizontalBreadcrumb.java50 private BreadcrumbAdapter mAdapter; field in HorizontalBreadcrumb
73 mAdapter = new BreadcrumbAdapter( in setup()
93 setAdapter(mAdapter); in show()
95 int currentItemCount = mAdapter.getItemCount(); in show()
96 int lastItemCount = mAdapter.getLastItemSize(); in show()
98 mAdapter.notifyItemRangeInserted(lastItemCount, in show()
100 mAdapter.notifyItemChanged(lastItemCount - 1); in show()
102 mAdapter.notifyItemRangeRemoved(currentItemCount, in show()
104 mAdapter.notifyItemChanged(currentItemCount - 1); in show()
108 mLayoutManager.scrollToPosition(mAdapter.getItemCount() - 1); in show()
[all …]
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DFlipperDreamSettings.java42 private SectionedAlbumDataAdapter mAdapter; field in FlipperDreamSettings
69 mAdapter = new SectionedAlbumDataAdapter(FlipperDreamSettings.this, in init()
79 mAdapter.registerDataSetObserver(new DataSetObserver () { in init()
89 setListAdapter(mAdapter); in init()
92 showApology(mAdapter.getCount() == 0); in init()
111 if (mAdapter != null) { in onOptionsItemSelected()
112 mAdapter.selectAll(!mAdapter.areAllSelected()); in onOptionsItemSelected()
130 if (mAdapter != null && mSelectAll != null) { in updateActionItem()
131 if (mAdapter.areAllSelected()) { in updateActionItem()
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/
DAvrcpControllerService.java93 private final BluetoothAdapter mAdapter; field in AvrcpControllerService
126 mAdapter = BluetoothAdapter.getDefaultAdapter(); in AvrcpControllerService()
343 BluetoothDevice device = mAdapter.getRemoteDevice(address); in onConnectionStateChanged()
370 BluetoothDevice device = mAdapter.getRemoteDevice(address); in getRcPsm()
389 BluetoothDevice device = mAdapter.getRemoteDevice(address); in handleRegisterNotificationAbsVol()
402 BluetoothDevice device = mAdapter.getRemoteDevice(address); in handleSetAbsVolume()
417 BluetoothDevice device = mAdapter.getRemoteDevice(address); in onTrackChanged()
443 BluetoothDevice device = mAdapter.getRemoteDevice(address); in onPlayPositionChanged()
477 BluetoothDevice device = mAdapter.getRemoteDevice(address); in onPlayStatusChanged()
491 BluetoothDevice device = mAdapter.getRemoteDevice(address); in handlePlayerAppSetting()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/localepicker/
DLocaleListEditor.java58 private LocaleDragAndDropAdapter mAdapter; field in LocaleListEditor
81 mAdapter = new LocaleDragAndDropAdapter(this.getContext(), feedsList); in onCreate()
120 mAdapter.restoreState(savedInstanceState); in onViewStateRestored()
132 mAdapter.saveState(outState); in onSaveInstanceState()
162 mAdapter.addLocale(locale); in onActivityResult()
170 mAdapter.setRemoveMode(mRemoveMode); in setRemoveMode()
180 int checkedCount = mAdapter.getCheckedCount(); in showRemoveLocaleWarningDialog()
189 if (checkedCount == mAdapter.getItemCount()) { in showRemoveLocaleWarningDialog()
236 mAdapter.removeChecked(); in showRemoveLocaleWarningDialog()
273 final LocaleLinearLayoutManager llm = new LocaleLinearLayoutManager(getContext(), mAdapter); in configureDragAndDrop()
[all …]
/packages/apps/Settings/src/com/android/settings/localepicker/
DLocaleListEditor.java58 private LocaleDragAndDropAdapter mAdapter; field in LocaleListEditor
81 mAdapter = new LocaleDragAndDropAdapter(this.getContext(), feedsList); in onCreate()
120 mAdapter.restoreState(savedInstanceState); in onViewStateRestored()
132 mAdapter.saveState(outState); in onSaveInstanceState()
162 mAdapter.addLocale(locale); in onActivityResult()
170 mAdapter.setRemoveMode(mRemoveMode); in setRemoveMode()
180 int checkedCount = mAdapter.getCheckedCount(); in showRemoveLocaleWarningDialog()
189 if (checkedCount == mAdapter.getItemCount()) { in showRemoveLocaleWarningDialog()
236 mAdapter.removeChecked(); in showRemoveLocaleWarningDialog()
273 final LocaleLinearLayoutManager llm = new LocaleLinearLayoutManager(getContext(), mAdapter); in configureDragAndDrop()
[all …]
/packages/apps/Launcher3/tests/src/com/android/launcher3/widget/
DWidgetsListAdapterTest.java60 private WidgetsListAdapter mAdapter; field in WidgetsListAdapterTest
71 mAdapter = new WidgetsListAdapter(mContext, mMockLayoutInflater, mMockWidgetCache, in setup()
73 mAdapter.registerAdapterDataObserver(mListener); in setup()
78 mAdapter.setWidgets(generateSampleMap(1)); in test_notifyDataSetChanged()
84 mAdapter.setWidgets(generateSampleMap(1)); in test_notifyItemInserted()
85 mAdapter.setWidgets(generateSampleMap(2)); in test_notifyItemInserted()
92 mAdapter.setWidgets(generateSampleMap(2)); in test_notifyItemRemoved()
93 mAdapter.setWidgets(generateSampleMap(1)); in test_notifyItemRemoved()
100 mAdapter.setWidgets(generateSampleMap(1)); in testNotifyItemChanged_PackageIconDiff()
101 mAdapter.setWidgets(generateSampleMap(1)); in testNotifyItemChanged_PackageIconDiff()
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/
DIngestActivity.java70 private MtpAdapter mAdapter; field in IngestActivity
101 mAdapter = new MtpAdapter(this); in onCreate()
102 mAdapter.registerDataSetObserver(mPrimaryObserver); in onCreate()
103 mGridView.setAdapter(mAdapter); in onCreate()
139 if (mAdapter.itemAtPositionIsBucket(position)) {
146 int nextSectionStart = mAdapter.getPositionForSection(
147 mAdapter.getSectionForPosition(position) + 1);
149 nextSectionStart = mAdapter.getCount();
216 mAdapter); in onOptionsItemSelected() local
303 mLastMappingGrid = mAdapter.translatePositionWithoutLabels(position); in mapPagerToGridPosition()
[all …]
/packages/apps/Contacts/src/com/android/contacts/editor/
DGroupMembershipView.java158 private GroupMembershipAdapter<GroupSelectionItem> mAdapter; field in GroupMembershipView
234 final int position = mAdapter.getNewestGroupPosition(); in setGroupMetaData()
348 mAdapter = new GroupMembershipAdapter<GroupSelectionItem>( in onClick()
365 mAdapter.setNewestGroupPosition(mAdapter.getCount()); in onClick()
369 mAdapter.add(new GroupSelectionItem(groupId, title, checked)); in onClick()
374 mAdapter.add(new GroupSelectionItem(CREATE_NEW_GROUP_GROUP_ID, in onClick()
379 mPopup.setAdapter(mAdapter); in onClick()
387 int count = mAdapter.getCount(); in onClick()
389 listView.setItemChecked(i, mAdapter.getItem(i).isChecked()); in onClick()
405 int count = mAdapter.getCount(); in onItemClick()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/state/
DStatePanelTrack.java49 private StateAdapter mAdapter; field in StatePanelTrack
117 mAdapter.insert(new State(mCurrentSelectedView.getState()), pos); in addDuplicate()
137 mAdapter = adapter; in setAdapter()
138 mAdapter.registerDataSetObserver(mObserver); in setAdapter()
139 mAdapter.setOrientation(getOrientation()); in setAdapter()
158 int n = mAdapter.getCount(); in fillContent()
162 if (!mAdapter.contains(child.getState())) { in fillContent()
168 State s = mAdapter.getItem(i); in fillContent()
170 View view = mAdapter.getView(i, null, this); in fillContent()
176 State state = mAdapter.getItem(i); in fillContent()
[all …]
/packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/
DRequestRoleFragment.java80 private Adapter mAdapter; field in RequestRoleFragment
159 mAdapter = new Adapter(mListView, mRole); in onCreateDialog()
161 mAdapter.onRestoreInstanceState(savedInstanceState); in onCreateDialog()
163 mListView.setAdapter(mAdapter); in onCreateDialog()
175 mAdapter.setDontAskAgain(dontAskAgain); in onCreateDialog()
238 mAdapter.onSaveInstanceState(outState); in onSaveInstanceState()
267 mAdapter.replace(qualifyingApplications); in onRoleDataChanged()
272 mAdapter.onItemClicked(position); in onItemClicked()
289 String packageName = mAdapter.getCheckedPackageName(); in setRoleHolder()
351 mAdapter.setDontAskAgain(dontAskAgain); in updateUi()
[all …]
/packages/apps/Calendar/src/com/android/calendar/month/
DMonthByWeekFragment.java110 if (mAdapter != null) {
111 mAdapter.refresh();
219 if (mAdapter != null) { in onAttach()
220 mAdapter.setSelectedDay(mSelectedDay); in onAttach()
260 if (mAdapter == null) { in setUpAdapter()
261 mAdapter = new MonthByWeekAdapter(getActivity(), weekParams); in setUpAdapter()
262 mAdapter.registerDataSetObserver(mObserver); in setUpAdapter()
264 mAdapter.updateParams(weekParams); in setUpAdapter()
266 mAdapter.notifyDataSetChanged(); in setUpAdapter()
299 mAdapter.setListView(mListView); in onActivityCreated()
[all …]
/packages/apps/TV/src/com/android/tv/ui/sidepanel/
DSideFragment.java62 private ItemAdapter<T> mAdapter; field in SideFragment
109 mAdapter = new ItemAdapter(inflater, getItemList()); in onCreateView()
110 mListView.setAdapter(mAdapter); in onCreateView()
165 mAdapter.reset(items); in setItems()
185 mAdapter.notifyDataSetChanged(); in notifyDataSetChanged()
196 notifyItemChanged(mAdapter.getItem(position)); in notifyItemChanged()
205 notifyItemsChanged(0, mAdapter.getItemCount()); in notifyItemsChanged()
213 notifyItemsChanged(positionStart, mAdapter.getItemCount() - positionStart); in notifyItemsChanged()
322 private ItemAdapter mAdapter; field in SideFragment.ViewHolder
332 mAdapter = adapter; in onBind()
[all …]

123456789