/cts/tests/tests/widget/src/android/widget/cts/ |
D | ListViewTest.java | 113 private ListView mListView; field in ListViewTest 140 mListView = (ListView) mActivity.findViewById(R.id.listview_default); in setup() 168 int scrollAmount = mListView.getMaxScrollAmount(); in testGetMaxScrollAmount() 172 mListView.getLayoutParams().height = 0; in testGetMaxScrollAmount() 173 mListView.requestLayout(); in testGetMaxScrollAmount() 175 PollingCheck.waitFor(() -> mListView.getHeight() == 0); in testGetMaxScrollAmount() 177 scrollAmount = mListView.getMaxScrollAmount(); in testGetMaxScrollAmount() 182 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in setAdapter() 183 () -> mListView.setAdapter(adapter)); in setAdapter() 188 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in testAccessDividerHeight() [all …]
|
D | AbsListViewTest.java | 121 private AbsListView mListView; field in AbsListViewTest 148 mListView = (ListView) activity.findViewById(R.id.listview_default); in setup() 159 mListView.setFastScrollAlwaysVisible(false); in testAccessFastScrollEnabled_UiThread() 160 mListView.setFastScrollEnabled(false); in testAccessFastScrollEnabled_UiThread() 161 assertFalse(mListView.isFastScrollEnabled()); in testAccessFastScrollEnabled_UiThread() 163 mListView.setFastScrollAlwaysVisible(true); in testAccessFastScrollEnabled_UiThread() 164 mListView.setFastScrollEnabled(true); in testAccessFastScrollEnabled_UiThread() 165 assertTrue(mListView.isFastScrollEnabled()); in testAccessFastScrollEnabled_UiThread() 170 mListView.setFastScrollAlwaysVisible(false); in testAccessFastScrollEnabled() 171 mListView.setFastScrollEnabled(false); in testAccessFastScrollEnabled() [all …]
|
D | AbsListView_ScrollTest.java | 76 private AbsListView mListView; field in AbsListView_ScrollTest 98 mListView = (ListView) activity.findViewById(R.id.listview_default); in setup() 99 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in setup() 100 () -> mListView.setAdapter(mCountriesAdapter)); in setup() 120 mListView.setOnScrollListener(null); in onScrollStateChanged() 162 View targetChild = mListView.getChildAt(visibleIndexOfTarget); in onScroll() 164 (targetChild.getBottom() <= mListView.getHeight()); in onScroll() 166 mListView.setOnScrollListener(null); in onScroll() 173 return (position >= mListView.getFirstVisiblePosition()) && in isItemVisible() 174 (position <= mListView.getLastVisiblePosition()); in isItemVisible() [all …]
|
D | CheckedTextViewTest.java | 64 private ListView mListView; field in CheckedTextViewTest 75 mListView = (ListView) mActivity.findViewById(R.id.checkedtextview_listview); in setup() 111 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, () -> { in testChecked() 112 mListView.setAdapter(new CheckedTextViewAdapter()); in testChecked() 114 mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); in testChecked() 115 mListView.setItemChecked(1, true); in testChecked() 118 assertEquals(1, mListView.getCheckedItemPosition()); in testChecked() 119 assertTrue(mListView.isItemChecked(1)); in testChecked() 120 assertFalse(mListView.isItemChecked(0)); in testChecked() 122 final ListAdapter adapter = mListView.getAdapter(); in testChecked() [all …]
|
/cts/tests/tests/view/src/android/view/animation/cts/ |
D | LayoutAnimationControllerTest.java | 66 private ListView mListView; field in LayoutAnimationControllerTest 76 mListView = mActivity.getListView(); in setup() 87 AnimationTestUtils.assertRunController(mActivityRule, mListView, mController, in testAccessOrder() 90 Animation childAnimation1 = mListView.getChildAt(INDEX_OF_CHILD1).getAnimation(); in testAccessOrder() 91 Animation childAnimation2 = mListView.getChildAt(INDEX_OF_CHILD2).getAnimation(); in testAccessOrder() 92 Animation childAnimation3 = mListView.getChildAt(INDEX_OF_CHILD3).getAnimation(); in testAccessOrder() 131 AnimationTestUtils.assertRunController(mActivityRule, mListView, mController, in testAccessOrder() 137 childAnimation1 = mListView.getChildAt(INDEX_OF_CHILD1).getAnimation(); in testAccessOrder() 138 childAnimation2 = mListView.getChildAt(INDEX_OF_CHILD2).getAnimation(); in testAccessOrder() 139 childAnimation3 = mListView.getChildAt(INDEX_OF_CHILD3).getAnimation(); in testAccessOrder() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/util/ |
D | ListScenario.java | 46 private ListView mListView; field in ListScenario 79 return mListView; in getListView() 301 mListView = createListView(); in onCreate() 302 mListView.setLayoutParams(new ViewGroup.LayoutParams( in onCreate() 305 mListView.setDrawSelectorOnTop(false); in onCreate() 312 mListView.addHeaderView(header); in onCreate() 318 mListView.addFooterView(header); in onCreate() 322 setAdapter(mListView); in onCreate() 325 mListView.setItemsCanFocus(mItemsFocusable); in onCreate() 327 mListView.setSelection(mStartingSelectionPosition); in onCreate() [all …]
|
D | ListUtil.java | 28 private final ListView mListView; field in ListUtil 36 mListView = listView; in ListUtil() 46 if (desiredPos > mListView.getSelectedItemPosition()) { in arrowScrollToSelectedPosition() 55 while(mListView.getSelectedItemPosition() < position && --maxDowns > 0) { in arrowDownToSelectedPosition() 58 if (position != mListView.getSelectedItemPosition()) { in arrowDownToSelectedPosition() 66 while(mListView.getSelectedItemPosition() > position && --maxUps > 0) { in arrowUpToSelectedPosition() 69 if (position != mListView.getSelectedItemPosition()) { in arrowUpToSelectedPosition()
|
/cts/tests/app/src/android/app/cts/ |
D | AlertDialog_BuilderCursorTest.java | 51 private ListView mListView; field in AlertDialog_BuilderCursorTest 109 mListView = null; in setUp() 177 mListView = mDialog.getListView(); in testSetCursor() 178 mListView.performItemClick(null, 0, 0); in testSetCursor() 181 final SQLiteCursor selected = (SQLiteCursor) mListView.getSelectedItem(); in testSetCursor() 198 mListView = mDialog.getListView(); in testSetSingleChoiceItemsWithParamCursor() 199 mListView.performItemClick(null, 0, 0); in testSetSingleChoiceItemsWithParamCursor() 202 final SQLiteCursor selected = (SQLiteCursor) mListView.getSelectedItem(); in testSetSingleChoiceItemsWithParamCursor() 223 mListView = mDialog.getListView(); in testSetMultiChoiceItemsWithParamCursor() 224 mListView.performItemClick(null, 0, 0); in testSetMultiChoiceItemsWithParamCursor() [all …]
|
D | AlertDialog_BuilderTest.java | 79 private ListView mListView; field in AlertDialog_BuilderTest 407 mListView = mDialog.getListView(); in testSetItemsWithParamInt() 414 assertEquals(levels[0], mListView.getItemAtPosition(0)); in testSetItemsWithParamInt() 427 mListView = mDialog.getListView(); in testSetItemsWithParamCharSequence() 431 assertEquals(expect[0], mListView.getItemAtPosition(0)); in testSetItemsWithParamCharSequence() 443 mListView = mDialog.getListView(); in testSetAdapter() 447 assertEquals(adapter, mListView.getAdapter()); in testSetAdapter() 462 mListView = mDialog.getListView(); in testSetMultiChoiceItemsWithParamInt() 463 mSelectedItem = (CharSequence)mListView.getSelectedItem(); in testSetMultiChoiceItemsWithParamInt() 464 mListView.performItemClick(null, 0, 0); in testSetMultiChoiceItemsWithParamInt() [all …]
|
/cts/tests/tests/permission/src/android/permission/cts/ |
D | PermissionStubActivity.java | 30 private ListView mListView; field in PermissionStubActivity 36 mListView = new ListView(this); in onCreate() 37 mListView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, in onCreate() 40 setContentView(mListView); in onCreate()
|
/cts/tests/tests/appwidget/src/android/appwidget/cts/ |
D | CollectionAppWidgetTest.java | 103 private ListView mListView; field in CollectionAppWidgetTest 372 mListView = (ListView) mAppWidgetHostView.findViewById(R.id.remoteViews_list); in testSetScrollPosition() 383 CollectionAppWidgetProvider.configure(updateLatch, () -> mListView.getChildCount() > 0, in testSetScrollPosition() 394 mListView.setOnScrollListener( in testSetScrollPosition() 414 PollingCheck.waitFor(TEST_TIMEOUT_MS, () -> mListView.getVisibility() == View.VISIBLE); in testSetScrollPosition() 419 PollingCheck.waitFor(TEST_TIMEOUT_MS, () -> mListView.getChildCount() > 0); in testSetScrollPosition() 424 final int lastVisiblePosition = mListView.getLastVisiblePosition(); in testSetScrollPosition() 438 (offsetScrollTarget >= mListView.getFirstVisiblePosition())) { in testSetScrollPosition() 447 mListView.setOnScrollListener( in testSetScrollPosition()
|