Home
last modified time | relevance | path

Searched refs:mListView (Results 1 – 11 of 11) sorted by relevance

/cts/tests/tests/widget/src/android/widget/cts/
DAbsListViewTest.java135 private AbsListView mListView; field in AbsListViewTest
164 mListView = (ListView) activity.findViewById(R.id.listview_default); in setup()
170 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, () -> { in setup()
186 mListView.setFastScrollAlwaysVisible(false); in testAccessFastScrollEnabled_UiThread()
187 mListView.setFastScrollEnabled(false); in testAccessFastScrollEnabled_UiThread()
188 assertFalse(mListView.isFastScrollEnabled()); in testAccessFastScrollEnabled_UiThread()
190 mListView.setFastScrollAlwaysVisible(true); in testAccessFastScrollEnabled_UiThread()
191 mListView.setFastScrollEnabled(true); in testAccessFastScrollEnabled_UiThread()
192 assertTrue(mListView.isFastScrollEnabled()); in testAccessFastScrollEnabled_UiThread()
197 mListView.setFastScrollAlwaysVisible(false); in testAccessFastScrollEnabled()
[all …]
DListViewTest.java136 private ListView mListView; field in ListViewTest
177 mListView = (ListView) mActivity.findViewById(R.id.listview_default); in setup()
211 int scrollAmount = mListView.getMaxScrollAmount(); in testGetMaxScrollAmount()
215 mListView.getLayoutParams().height = 0; in testGetMaxScrollAmount()
216 mListView.requestLayout(); in testGetMaxScrollAmount()
218 PollingCheck.waitFor(() -> mListView.getHeight() == 0); in testGetMaxScrollAmount()
220 scrollAmount = mListView.getMaxScrollAmount(); in testGetMaxScrollAmount()
225 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in setAdapter()
226 () -> mListView.setAdapter(adapter)); in setAdapter()
231 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in testAccessDividerHeight()
[all …]
DAbsListView_ScrollTest.java84 private AbsListView mListView; field in AbsListView_ScrollTest
107 mListView = (ListView) activity.findViewById(R.id.listview_default); in setup()
108 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in setup()
109 () -> mListView.setAdapter(mCountriesAdapter)); in setup()
129 mListView.setOnScrollListener(null); in onScrollStateChanged()
171 View targetChild = mListView.getChildAt(visibleIndexOfTarget); in onScroll()
173 (targetChild.getBottom() <= mListView.getHeight()); in onScroll()
175 mListView.setOnScrollListener(null); in onScroll()
182 return (position >= mListView.getFirstVisiblePosition()) && in isItemVisible()
183 (position <= mListView.getLastVisiblePosition()); in isItemVisible()
[all …]
DCheckedTextViewTest.java66 private ListView mListView; field in CheckedTextViewTest
83 mListView = (ListView) mActivity.findViewById(R.id.checkedtextview_listview); in setup()
119 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, () -> { in testChecked()
120 mListView.setAdapter(new CheckedTextViewAdapter()); in testChecked()
122 mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); in testChecked()
123 mListView.setItemChecked(1, true); in testChecked()
126 assertEquals(1, mListView.getCheckedItemPosition()); in testChecked()
127 assertTrue(mListView.isItemChecked(1)); in testChecked()
128 assertFalse(mListView.isItemChecked(0)); in testChecked()
130 final ListAdapter adapter = mListView.getAdapter(); in testChecked()
[all …]
DRemoteViewsFixedCollectionAdapterTest.java104 private ListView mListView; field in RemoteViewsFixedCollectionAdapterTest
123 mListView = mView.findViewById(R.id.remoteView_list); in setUp()
450 mActivityRule, mListView, () -> mRemoteViews.reapply(mActivity, mView)); in testSetRemoteAdapter_emptyCollection()
452 assertEquals(0, mListView.getChildCount()); in testSetRemoteAdapter_emptyCollection()
453 assertEquals(0, mListView.getAdapter().getCount()); in testSetRemoteAdapter_emptyCollection()
454 assertEquals(1, mListView.getAdapter().getViewTypeCount()); in testSetRemoteAdapter_emptyCollection()
455 assertFalse(mListView.getAdapter().hasStableIds()); in testSetRemoteAdapter_emptyCollection()
474 mActivityRule, mListView, () -> mRemoteViews.reapply(mActivity, mView)); in testSetRemoteAdapter_withItems()
476 Adapter adapter = mListView.getAdapter(); in testSetRemoteAdapter_withItems()
484 assertEquals(2, mListView.getChildCount()); in testSetRemoteAdapter_withItems()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/util/
DListUtil.java28 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()
DListScenario.java46 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 …]
/cts/tests/tests/view/src/android/view/animation/cts/
DLayoutAnimationControllerTest.java71 private ListView mListView; field in LayoutAnimationControllerTest
87 mListView = mActivity.getListView(); in setup()
98 AnimationTestUtils.assertRunController(mActivityRule, mListView, mController, in testAccessOrder()
101 Animation childAnimation1 = mListView.getChildAt(INDEX_OF_CHILD1).getAnimation(); in testAccessOrder()
102 Animation childAnimation2 = mListView.getChildAt(INDEX_OF_CHILD2).getAnimation(); in testAccessOrder()
103 Animation childAnimation3 = mListView.getChildAt(INDEX_OF_CHILD3).getAnimation(); in testAccessOrder()
142 AnimationTestUtils.assertRunController(mActivityRule, mListView, mController, in testAccessOrder()
148 childAnimation1 = mListView.getChildAt(INDEX_OF_CHILD1).getAnimation(); in testAccessOrder()
149 childAnimation2 = mListView.getChildAt(INDEX_OF_CHILD2).getAnimation(); in testAccessOrder()
150 childAnimation3 = mListView.getChildAt(INDEX_OF_CHILD3).getAnimation(); in testAccessOrder()
[all …]
/cts/tests/app/src/android/app/cts/
DAlertDialog_BuilderCursorTest.java57 private ListView mListView; field in AlertDialog_BuilderCursorTest
108 mListView = null; in setUp()
174 mListView = mDialog.getListView(); in testSetCursor()
177 if (mListView.isInTouchMode()) { in testSetCursor()
178 reAttachListViewAdapter(mListView); in testSetCursor()
180 mActivityRule.getScenario().onActivity(unused -> mListView.performItemClick(null, 0, 0)); in testSetCursor()
182 final SQLiteCursor selected = (SQLiteCursor) mListView.getSelectedItem(); in testSetCursor()
199 mListView = mDialog.getListView(); in testSetSingleChoiceItemsWithParamCursor()
200 mListView.performItemClick(null, 0, 0); in testSetSingleChoiceItemsWithParamCursor()
204 final SQLiteCursor selected = (SQLiteCursor) mListView.getSelectedItem(); in testSetSingleChoiceItemsWithParamCursor()
[all …]
DAlertDialog_BuilderTest.java72 private ListView mListView; field in AlertDialog_BuilderTest
349 mListView = mDialog.getListView(); in testSetItemsWithParamInt()
355 assertEquals(levels[0], mListView.getItemAtPosition(0)); in testSetItemsWithParamInt()
367 mListView = mDialog.getListView(); in testSetItemsWithParamCharSequence()
370 assertEquals(expect[0], mListView.getItemAtPosition(0)); in testSetItemsWithParamCharSequence()
380 mListView = mDialog.getListView(); in testSetAdapter()
383 assertEquals(adapter, mListView.getAdapter()); in testSetAdapter()
396 mListView = mDialog.getListView(); in testSetMultiChoiceItemsWithParamInt()
398 if (mListView.isInTouchMode()) { in testSetMultiChoiceItemsWithParamInt()
399 reAttachListViewAdapter(mListView); in testSetMultiChoiceItemsWithParamInt()
[all …]
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DCollectionAppWidgetTest.java108 private ListView mListView; field in CollectionAppWidgetTest
456 mListView = (ListView) mAppWidgetHostView.findViewById(R.id.remoteViews_list); in testSetScrollPosition()
467 CollectionAppWidgetProvider.configure(updateLatch, () -> mListView.getChildCount() > 0, in testSetScrollPosition()
478 mListView.setOnScrollListener( in testSetScrollPosition()
498 PollingCheck.waitFor(TEST_TIMEOUT_MS, () -> mListView.getVisibility() == View.VISIBLE); in testSetScrollPosition()
503 PollingCheck.waitFor(TEST_TIMEOUT_MS, () -> mListView.getChildCount() > 0); in testSetScrollPosition()
508 final int lastVisiblePosition = mListView.getLastVisiblePosition(); in testSetScrollPosition()
522 (offsetScrollTarget >= mListView.getFirstVisiblePosition())) { in testSetScrollPosition()
531 mListView.setOnScrollListener( in testSetScrollPosition()