Home
last modified time | relevance | path

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

/cts/tests/tests/widget/src/android/widget/cts/
DAbsListViewTest.java124 private AbsListView mListView; field in AbsListViewTest
151 mListView = (ListView) activity.findViewById(R.id.listview_default); in setup()
157 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, () -> { in setup()
173 mListView.setFastScrollAlwaysVisible(false); in testAccessFastScrollEnabled_UiThread()
174 mListView.setFastScrollEnabled(false); in testAccessFastScrollEnabled_UiThread()
175 assertFalse(mListView.isFastScrollEnabled()); in testAccessFastScrollEnabled_UiThread()
177 mListView.setFastScrollAlwaysVisible(true); in testAccessFastScrollEnabled_UiThread()
178 mListView.setFastScrollEnabled(true); in testAccessFastScrollEnabled_UiThread()
179 assertTrue(mListView.isFastScrollEnabled()); in testAccessFastScrollEnabled_UiThread()
184 mListView.setFastScrollAlwaysVisible(false); in testAccessFastScrollEnabled()
[all …]
DListViewTest.java129 private ListView mListView; field in ListViewTest
162 mListView = (ListView) mActivity.findViewById(R.id.listview_default); in setup()
196 int scrollAmount = mListView.getMaxScrollAmount(); in testGetMaxScrollAmount()
200 mListView.getLayoutParams().height = 0; in testGetMaxScrollAmount()
201 mListView.requestLayout(); in testGetMaxScrollAmount()
203 PollingCheck.waitFor(() -> mListView.getHeight() == 0); in testGetMaxScrollAmount()
205 scrollAmount = mListView.getMaxScrollAmount(); in testGetMaxScrollAmount()
210 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in setAdapter()
211 () -> mListView.setAdapter(adapter)); in setAdapter()
216 WidgetTestUtils.runOnMainAndDrawSync(mActivityRule, mListView, in testAccessDividerHeight()
[all …]
DAbsListView_ScrollTest.java76 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 …]
DCheckedTextViewTest.java64 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 …]
DRemoteViewsFixedCollectionAdapterTest.java95 private ListView mListView; field in RemoteViewsFixedCollectionAdapterTest
114 mListView = mView.findViewById(R.id.remoteView_list); in setUp()
440 mActivityRule, mListView, () -> mRemoteViews.reapply(mActivity, mView)); in testSetRemoteAdapter_emptyCollection()
442 assertEquals(0, mListView.getChildCount()); in testSetRemoteAdapter_emptyCollection()
443 assertEquals(0, mListView.getAdapter().getCount()); in testSetRemoteAdapter_emptyCollection()
444 assertEquals(1, mListView.getAdapter().getViewTypeCount()); in testSetRemoteAdapter_emptyCollection()
445 assertFalse(mListView.getAdapter().hasStableIds()); in testSetRemoteAdapter_emptyCollection()
464 mActivityRule, mListView, () -> mRemoteViews.reapply(mActivity, mView)); in testSetRemoteAdapter_withItems()
466 Adapter adapter = mListView.getAdapter(); in testSetRemoteAdapter_withItems()
474 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.java66 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/permission/src/android/permission/cts/
DPermissionStubActivity.java30 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/app/src/android/app/cts/
DAlertDialog_BuilderCursorTest.java50 private ListView mListView; field in AlertDialog_BuilderCursorTest
108 mListView = null; in setUp()
176 mListView = mDialog.getListView(); in testSetCursor()
177 mListView.performItemClick(null, 0, 0); in testSetCursor()
180 final SQLiteCursor selected = (SQLiteCursor) mListView.getSelectedItem(); in testSetCursor()
197 mListView = mDialog.getListView(); in testSetSingleChoiceItemsWithParamCursor()
198 mListView.performItemClick(null, 0, 0); in testSetSingleChoiceItemsWithParamCursor()
201 final SQLiteCursor selected = (SQLiteCursor) mListView.getSelectedItem(); in testSetSingleChoiceItemsWithParamCursor()
221 mListView = mDialog.getListView(); in testSetMultiChoiceItemsWithParamCursor()
222 mListView.performItemClick(null, 0, 0); in testSetMultiChoiceItemsWithParamCursor()
[all …]
DAlertDialog_BuilderTest.java76 private ListView mListView; field in AlertDialog_BuilderTest
393 mListView = mDialog.getListView(); in testSetItemsWithParamInt()
400 assertEquals(levels[0], mListView.getItemAtPosition(0)); in testSetItemsWithParamInt()
413 mListView = mDialog.getListView(); in testSetItemsWithParamCharSequence()
417 assertEquals(expect[0], mListView.getItemAtPosition(0)); in testSetItemsWithParamCharSequence()
428 mListView = mDialog.getListView(); in testSetAdapter()
432 assertEquals(adapter, mListView.getAdapter()); in testSetAdapter()
447 mListView = mDialog.getListView(); in testSetMultiChoiceItemsWithParamInt()
448 mSelectedItem = (CharSequence)mListView.getSelectedItem(); in testSetMultiChoiceItemsWithParamInt()
449 mListView.performItemClick(null, 0, 0); in testSetMultiChoiceItemsWithParamInt()
[all …]
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DCollectionAppWidgetTest.java107 private ListView mListView; field in CollectionAppWidgetTest
454 mListView = (ListView) mAppWidgetHostView.findViewById(R.id.remoteViews_list); in testSetScrollPosition()
465 CollectionAppWidgetProvider.configure(updateLatch, () -> mListView.getChildCount() > 0, in testSetScrollPosition()
476 mListView.setOnScrollListener( in testSetScrollPosition()
496 PollingCheck.waitFor(TEST_TIMEOUT_MS, () -> mListView.getVisibility() == View.VISIBLE); in testSetScrollPosition()
501 PollingCheck.waitFor(TEST_TIMEOUT_MS, () -> mListView.getChildCount() > 0); in testSetScrollPosition()
506 final int lastVisiblePosition = mListView.getLastVisiblePosition(); in testSetScrollPosition()
520 (offsetScrollTarget >= mListView.getFirstVisiblePosition())) { in testSetScrollPosition()
529 mListView.setOnScrollListener( in testSetScrollPosition()