/frameworks/ex/common/tests/src/com/android/common/widget/ |
D | CompositeCursorAdapterTest.java | 81 TestCompositeCursorAdapter adapter = new TestCompositeCursorAdapter(); in testGetCountNoEmptySections() local 82 adapter.addPartition(false, false); in testGetCountNoEmptySections() 83 adapter.addPartition(false, false); in testGetCountNoEmptySections() 85 adapter.changeCursor(0, makeCursor("a", 2)); in testGetCountNoEmptySections() 86 adapter.changeCursor(1, makeCursor("b", 3)); in testGetCountNoEmptySections() 88 assertEquals(5, adapter.getCount()); in testGetCountNoEmptySections() 92 TestCompositeCursorAdapter adapter = new TestCompositeCursorAdapter(); in testGetViewNoEmptySections() local 93 adapter.addPartition(false, false); in testGetViewNoEmptySections() 94 adapter.addPartition(false, false); in testGetViewNoEmptySections() 96 adapter.changeCursor(0, makeCursor("a", 1)); in testGetViewNoEmptySections() [all …]
|
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/ |
D | BluetoothStressTest.java | 64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testEnable() local 65 mTestUtils.disable(adapter); in testEnable() 69 mTestUtils.enable(adapter); in testEnable() 70 mTestUtils.disable(adapter); in testEnable() 83 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testDiscoverable() local 84 mTestUtils.disable(adapter); in testDiscoverable() 85 mTestUtils.enable(adapter); in testDiscoverable() 86 mTestUtils.undiscoverable(adapter); in testDiscoverable() 90 mTestUtils.discoverable(adapter); in testDiscoverable() 91 mTestUtils.undiscoverable(adapter); in testDiscoverable() [all …]
|
D | BluetoothRebootStressTest.java | 54 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testStart() local 55 mTestUtils.enable(adapter); in testStart() 64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testMiddleNoToggle() local 66 assertTrue(adapter.isEnabled()); in testMiddleNoToggle() 75 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testMiddleToggle() local 77 assertTrue(adapter.isEnabled()); in testMiddleToggle() 79 mTestUtils.disable(adapter); in testMiddleToggle() 80 mTestUtils.enable(adapter); in testMiddleToggle() 88 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testStop() local 90 assertTrue(adapter.isEnabled()); in testStop() [all …]
|
D | BluetoothTestUtils.java | 423 public void enable(BluetoothAdapter adapter) { in enable() argument 429 int state = adapter.getState(); in enable() 432 assertTrue(adapter.isEnabled()); in enable() 436 assertFalse(adapter.isEnabled()); in enable() 440 assertFalse(adapter.isEnabled()); in enable() 442 assertTrue(adapter.enable()); in enable() 446 assertTrue(adapter.enable()); in enable() 455 state = adapter.getState(); in enable() 458 assertTrue(adapter.isEnabled()); in enable() 483 public void disable(BluetoothAdapter adapter) { in disable() argument [all …]
|
/frameworks/opt/mailcommon/tests/src/com/android/mailcommon/ |
D | MergedAdapterTest.java | 108 MergedAdapter<ListSpinnerAdapter> adapter = new MergedAdapter<ListSpinnerAdapter>(); in testGetSubAdapters() local 110 adapter.setAdapters(mFirst, mSecond); in testGetSubAdapters() 111 assertEquals(2, adapter.getSubAdapterCount()); in testGetSubAdapters() 112 assertEquals(mFirst, adapter.getSubAdapter(0)); in testGetSubAdapters() 113 assertEquals(mSecond, adapter.getSubAdapter(1)); in testGetSubAdapters() 117 MergedAdapter<ListSpinnerAdapter> adapter = new MergedAdapter<ListSpinnerAdapter>(); in testGetSubAdapterOffset() local 119 adapter.setAdapters(mFirst, mSecond); in testGetSubAdapterOffset() 120 LocalAdapterPosition<ListSpinnerAdapter> p = adapter.getAdapterOffsetForItem(13); in testGetSubAdapterOffset() 126 MergedAdapter<ListSpinnerAdapter> adapter = new MergedAdapter<ListSpinnerAdapter>(); in testGetItemAndCount() local 128 adapter.setAdapters(mFirst, mSecond); in testGetItemAndCount() [all …]
|
/frameworks/opt/mailcommon/java/com/android/mailcommon/ |
D | MergedAdapter.java | 52 public LocalAdapterPosition(T adapter, int offset) { in LocalAdapterPosition() argument 53 mAdapter = adapter; in LocalAdapterPosition() 69 for (T adapter : mAdapters) { in setAdapters() 70 adapter.unregisterDataSetObserver(mObserver); in setAdapters() 76 for (T adapter : mAdapters) { in setAdapters() 77 adapter.registerDataSetObserver(mObserver); in setAdapters() 92 for (T adapter : mAdapters) { in getCount() 93 count += adapter.getCount(); in getCount() 141 for (T adapter : mAdapters) { in getViewTypeCount() 142 count += adapter.getViewTypeCount(); in getViewTypeCount() [all …]
|
D | MultiAdapterSpinner.java | 112 public void setSelectedItem(final FancySpinnerAdapter adapter, final int position) { in setSelectedItem() argument 118 if (a == adapter) { 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()
|
/frameworks/base/nfc-extras/java/com/android/nfc_extras/ |
D | NfcAdapterExtras.java | 76 private static void initService(NfcAdapter adapter) { in initService() argument 77 final INfcAdapterExtras service = adapter.getNfcAdapterExtrasInterface(); in initService() 93 public static NfcAdapterExtras get(NfcAdapter adapter) { in get() argument 94 Context context = adapter.getContext(); in get() 102 initService(adapter); in get() 104 NfcAdapterExtras extras = sNfcExtras.get(adapter); in get() 106 extras = new NfcAdapterExtras(adapter); in get() 107 sNfcExtras.put(adapter, extras); in get() 113 private NfcAdapterExtras(NfcAdapter adapter) { in NfcAdapterExtras() argument 114 mAdapter = adapter; in NfcAdapterExtras() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | AdapterView.java | 440 public abstract void setAdapter(T adapter); in setAdapter() argument 565 T adapter = getAdapter(); in getSelectedItem() local 567 if (adapter != null && adapter.getCount() > 0 && selection >= 0) { in getSelectedItem() 568 return adapter.getItem(selection); in getSelectedItem() 658 final T adapter = getAdapter(); in setEmptyView() local 659 final boolean empty = ((adapter == null) || adapter.isEmpty()); in setEmptyView() 686 final T adapter = getAdapter(); in setFocusable() local 687 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusable() 699 final T adapter = getAdapter(); in setFocusableInTouchMode() local 700 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusableInTouchMode() [all …]
|
D | Spinner.java | 381 public void setAdapter(SpinnerAdapter adapter) { in setAdapter() argument 382 super.setAdapter(adapter); in setAdapter() 385 mPopup.setAdapter(new DropDownAdapter(adapter)); in setAdapter() 387 mTempAdapter = new DropDownAdapter(adapter); in setAdapter() 661 int measureContentWidth(SpinnerAdapter adapter, Drawable background) { in measureContentWidth() argument 662 if (adapter == null) { in measureContentWidth() 677 final int end = Math.min(adapter.getCount(), start + MAX_ITEMS_MEASURED); in measureContentWidth() 681 final int positionType = adapter.getItemViewType(i); in measureContentWidth() 686 itemView = adapter.getView(i, itemView, this); in measureContentWidth() 781 public DropDownAdapter(SpinnerAdapter adapter) { in DropDownAdapter() argument [all …]
|
D | ExpandableListConnector.java | 470 HeterogeneousExpandableList adapter = in getItemViewType() local 473 retValue = adapter.getGroupType(pos.groupPos); in getItemViewType() 475 final int childType = adapter.getChildType(pos.groupPos, pos.childPos); in getItemViewType() 476 retValue = adapter.getGroupTypeCount() + childType; in getItemViewType() 494 HeterogeneousExpandableList adapter = in getViewTypeCount() local 496 return adapter.getGroupTypeCount() + adapter.getChildTypeCount(); in getViewTypeCount() 729 ExpandableListAdapter adapter = getAdapter(); in getFilter() local 730 if (adapter instanceof Filterable) { in getFilter() 731 return ((Filterable) adapter).getFilter(); in getFilter() 763 ExpandableListAdapter adapter = getAdapter(); in isEmpty() local [all …]
|
D | RemoteViewsAdapter.java | 149 public RemoteViewsAdapterServiceConnection(RemoteViewsAdapter adapter) { in RemoteViewsAdapterServiceConnection() argument 150 mAdapter = new WeakReference<RemoteViewsAdapter>(adapter); in RemoteViewsAdapterServiceConnection() 156 RemoteViewsAdapter adapter; in bind() local 159 && (adapter = mAdapter.get()) != null) { in bind() 161 new UserHandle(adapter.mUserId)); in bind() 177 RemoteViewsAdapter adapter; in unbind() local 180 && (adapter = mAdapter.get()) != null) { in unbind() 182 new UserHandle(adapter.mUserId)); in unbind() 198 final RemoteViewsAdapter adapter = mAdapter.get(); in onServiceConnected() local 199 if (adapter == null) return; in onServiceConnected() [all …]
|
D | AutoCompleteTextView.java | 626 public <T extends ListAdapter & Filterable> void setAdapter(T adapter) { in setAdapter() argument 632 mAdapter = adapter; in setAdapter() 636 adapter.registerDataSetObserver(mObserver); in setAdapter() 1112 final ListAdapter adapter = mAdapter; in buildImeCompletions() local 1113 if (adapter != null) { in buildImeCompletions() 1116 final int count = Math.min(adapter.getCount(), 20); in buildImeCompletions() 1121 if (adapter.isEnabled(i)) { in buildImeCompletions() 1122 Object item = adapter.getItem(i); in buildImeCompletions() 1123 long id = adapter.getItemId(i); in buildImeCompletions() 1264 final ListAdapter adapter = mAdapter; in onChanged() [all …]
|
/frameworks/support/v7/appcompat/src/android/support/v7/internal/widget/ |
D | AdapterViewICS.java | 450 public abstract void setAdapter(T adapter); in setAdapter() argument 575 T adapter = getAdapter(); in getSelectedItem() local 577 if (adapter != null && adapter.getCount() > 0 && selection >= 0) { in getSelectedItem() 578 return adapter.getItem(selection); in getSelectedItem() 661 final T adapter = getAdapter(); in setEmptyView() local 662 final boolean empty = ((adapter == null) || adapter.isEmpty()); in setEmptyView() 689 final T adapter = getAdapter(); in setFocusable() local 690 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusable() 702 final T adapter = getAdapter(); in setFocusableInTouchMode() local 703 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusableInTouchMode() [all …]
|
D | SpinnerICS.java | 222 public void setAdapter(SpinnerAdapter adapter) { in setAdapter() argument 223 super.setAdapter(adapter); in setAdapter() 226 mPopup.setAdapter(new DropDownAdapter(adapter)); in setAdapter() 228 mTempAdapter = new DropDownAdapter(adapter); in setAdapter() 478 int measureContentWidth(SpinnerAdapter adapter, Drawable background) { in measureContentWidth() argument 479 if (adapter == null) { in measureContentWidth() 494 final int end = Math.min(adapter.getCount(), start + MAX_ITEMS_MEASURED); in measureContentWidth() 498 final int positionType = adapter.getItemViewType(i); in measureContentWidth() 503 itemView = adapter.getView(i, itemView, this); in measureContentWidth() 535 public DropDownAdapter(SpinnerAdapter adapter) { in DropDownAdapter() argument [all …]
|
D | ListPopupWindow.java | 204 public void setAdapter(ListAdapter adapter) { in setAdapter() argument 210 mAdapter = adapter; in setAdapter() 212 adapter.registerDataSetObserver(mObserver); in setAdapter() 706 final ListAdapter adapter = list.getAdapter(); in performItemClick() local 707 mItemClickListener.onItemClick(list, child, position, adapter.getItemId(position)); in performItemClick() 804 final ListAdapter adapter = mAdapter; in onKeyDown() local 810 if (adapter != null) { in onKeyDown() 811 allEnabled = adapter.areAllItemsEnabled(); in onKeyDown() 814 lastItem = allEnabled ? adapter.getCount() - 1 : in onKeyDown() 815 mDropDownList.lookForSelectablePosition(adapter.getCount() - 1, false); in onKeyDown() [all …]
|
/frameworks/base/core/java/android/nfc/ |
D | NfcManager.java | 47 NfcAdapter adapter; in NfcManager() local 54 adapter = NfcAdapter.getNfcAdapter(context); in NfcManager() 56 adapter = null; in NfcManager() 58 mAdapter = adapter; in NfcManager()
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | ListViewTest.java | 45 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testRequestLayout() local 46 listView.setAdapter(adapter); in testRequestLayout() 50 adapter.notifyDataSetChanged(); in testRequestLayout() 75 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testNoSelectableItems() local 76 listView.setAdapter(adapter); in testNoSelectableItems() 82 adapter.notifyDataSetChanged(); in testNoSelectableItems() 88 adapter.notifyDataSetChanged(); in testNoSelectableItems()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | BluetoothController.java | 59 final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothController() local 60 if (adapter != null) { in BluetoothController() 61 handleAdapterStateChange(adapter.getState()); in BluetoothController() 62 handleConnectionStateChange(adapter.getConnectionState()); in BluetoothController() 101 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in updateBondedBluetoothDevices() local 102 if (adapter != null) { in updateBondedBluetoothDevices() 103 Set<BluetoothDevice> devices = adapter.getBondedDevices(); in updateBondedBluetoothDevices()
|
/frameworks/support/v4/java/android/support/v4/view/ |
D | PagerTitleStrip.java | 251 final PagerAdapter adapter = pager.getAdapter(); in onAttachedToWindow() local 256 updateAdapter(mWatchingAdapter != null ? mWatchingAdapter.get() : null, adapter); in onAttachedToWindow() 270 void updateText(int currentItem, PagerAdapter adapter) { in updateText() argument 271 final int itemCount = adapter != null ? adapter.getCount() : 0; in updateText() 275 if (currentItem >= 1 && adapter != null) { in updateText() 276 text = adapter.getPageTitle(currentItem - 1); in updateText() 280 mCurrText.setText(adapter != null && currentItem < itemCount ? in updateText() 281 adapter.getPageTitle(currentItem) : null); in updateText() 284 if (currentItem + 1 < itemCount && adapter != null) { in updateText() 285 text = adapter.getPageTitle(currentItem + 1); in updateText()
|
/frameworks/base/core/java/com/android/internal/view/menu/ |
D | MenuPopupHelper.java | 155 MenuAdapter adapter = mAdapter; in onItemClick() local 156 adapter.mAdapterMenu.performItemAction(adapter.getItem(position), 0); in onItemClick() 167 private int measureContentWidth(ListAdapter adapter) { in measureContentWidth() argument 176 final int count = adapter.getCount(); in measureContentWidth() 178 final int positionType = adapter.getItemViewType(i); in measureContentWidth() 186 itemView = adapter.getView(i, itemView, mMeasureParent); in measureContentWidth()
|
/frameworks/support/v7/appcompat/src/android/support/v7/internal/view/menu/ |
D | MenuPopupHelper.java | 159 MenuAdapter adapter = mAdapter; in onItemClick() local 160 adapter.mAdapterMenu.performItemAction(adapter.getItem(position), 0); in onItemClick() 171 private int measureContentWidth(ListAdapter adapter) { in measureContentWidth() argument 180 final int count = adapter.getCount(); in measureContentWidth() 182 final int positionType = adapter.getItemViewType(i); in measureContentWidth() 190 itemView = adapter.getView(i, itemView, mMeasureParent); in measureContentWidth()
|
/frameworks/base/core/java/android/app/ |
D | ListFragment.java | 236 public void setListAdapter(ListAdapter adapter) { in setListAdapter() argument 238 mAdapter = adapter; in setListAdapter() 240 mList.setAdapter(adapter); in setListAdapter() 422 ListAdapter adapter = mAdapter; in ensureList() local 424 setListAdapter(adapter); in ensureList()
|
D | ListActivity.java | 261 public void setListAdapter(ListAdapter adapter) { in setListAdapter() argument 264 mAdapter = adapter; in setListAdapter() 265 mList.setAdapter(adapter); in setListAdapter()
|
/frameworks/base/docs/html/training/load-data-background/ |
D | handle-results.jd | 54 provide the view with an adapter that implements 59 You can set up the linkage between the view and adapter before you have any data to display, 60 and then move a {@link android.database.Cursor} into the adapter in the 62 method. As soon as you move the {@link android.database.Cursor} into the adapter, the 91 // Sets the adapter for the view 102 * Moves the query results into the adapter, causing the 103 * ListView fronting this adapter to re-display 132 * Clears out the adapter's reference to the Cursor.
|