/frameworks/base/core/tests/coretests/src/android/widget/listview/touch/ |
ListTouchBottomGravityTest.java | 33 private ListView mListView; 44 mListView = getActivity().getListView(); 50 assertNotNull(mListView); 53 assertEquals(mListView.getAdapter().getCount() - 1, mListView.getSelectedItemPosition()); 58 View firstChild = mListView.getChildAt(0); 62 View lastChild = mListView.getChildAt(mListView.getChildCount() - 1); 66 mListView.getSelectedItemPosition()); 68 assertEquals("List is not scrolled to the bottom", mListView.getAdapter().getCount() - 1 [all...] |
ListTouchManyTest.java | 35 private ListView mListView; 46 mListView = getActivity().getListView(); 52 assertNotNull(mListView); 55 assertEquals(0, mListView.getSelectedItemPosition()); 60 TouchUtils.scrollToTop(this, mListView); 64 mListView.getSelectedItemPosition()); 66 View firstChild = mListView.getChildAt(0); 70 assertEquals("Item zero not at the top of the list", mListView.getListPaddingTop(), 76 int originalCount = mListView.getChildCount(); 78 TouchUtils.scrollToBottom(this, mListView); [all...] |
ListTouchBottomGravityManyTest.java | 36 private ListView mListView; 47 mListView = getActivity().getListView(); 53 assertNotNull(mListView); 56 assertEquals(mListView.getAdapter().getCount() - 1, mListView.getSelectedItemPosition()); 61 int originalCount = mListView.getChildCount(); 63 TouchUtils.scrollToTop(this, mListView); 67 mListView.getSelectedItemPosition()); 69 View firstChild = mListView.getChildAt(0); 73 assertEquals("Item zero not at the top of the list", mListView.getListPaddingTop() [all...] |
ListTouchTest.java | 32 private ListView mListView; 43 mListView = getActivity().getListView(); 49 assertNotNull(mListView); 52 assertEquals(0, mListView.getSelectedItemPosition()); 57 View firstChild = mListView.getChildAt(0); 63 mListView.getSelectedItemPosition()); 65 firstChild = mListView.getChildAt(0); 69 assertEquals("Item zero not at the top of the list", mListView.getListPaddingTop(), 75 View lastChild = mListView.getChildAt(mListView.getChildCount() - 1) [all...] |
ListGetSelectedViewTest.java | 34 private ListView mListView; 45 mListView = getActivity().getListView(); 51 assertNotNull(mListView); 53 assertEquals(0, mListView.getSelectedItemPosition()); 58 View last = mListView.getChildAt(1); 61 assertNull(mListView.getSelectedItem()); 62 assertNull(mListView.getSelectedView()); 63 assertEquals(-1, mListView.getSelectedItemPosition());
|
/frameworks/base/core/tests/coretests/src/android/widget/listview/arrowscroll/ |
ListOfItemsTallerThanScreenTest.java | 29 private ListView mListView; 36 mListView = getActivity().getListView(); 45 assertNotNull(mListView); 46 assertEquals("should only be one visible child", 1, mListView.getChildCount()); 47 final int amountOffScreen = mListView.getChildAt(0).getBottom() - (mListView.getBottom() - mListView.getListPaddingBottom()); 49 amountOffScreen > mListView.getMaxScrollAmount()); 54 final View view = mListView.getSelectedView(); 57 assertEquals(mListView.getListPaddingTop() [all...] |
ListWithFirstScreenUnSelectableTest.java | 27 private ListView mListView; 38 mListView = getActivity().getListView(); 42 assertTrue(mListView.isInTouchMode()); 43 assertEquals(1, mListView.getChildCount()); 44 assertFalse(mListView.getAdapter().isEnabled(0)); 45 assertEquals(AdapterView.INVALID_POSITION, mListView.getSelectedItemPosition()); 50 assertEquals(AdapterView.INVALID_POSITION, mListView.getSelectedItemPosition()); 55 assertEquals(AdapterView.INVALID_POSITION, mListView.getSelectedItemPosition()); 56 assertEquals(1, mListView.getChildCount()); 57 assertEquals(0, mListView.getFirstVisiblePosition()) [all...] |
ListWithOffScreenNextSelectableTest.java | 29 private ListView mListView; 39 mListView = getActivity().getListView(); 44 assertNotNull(mListView); 45 assertEquals(5, mListView.getAdapter().getCount()); 46 assertFalse(mListView.getAdapter().areAllItemsEnabled()); 47 assertFalse(mListView.getAdapter().isEnabled(1)); 48 assertFalse(mListView.getAdapter().isEnabled(2)); 49 assertFalse(mListView.getAdapter().isEnabled(3)); 52 4, mListView.getChildCount()); 53 assertEquals(0, mListView.getSelectedItemPosition()) [all...] |
ListOfThinItemsTest.java | 28 private ListView mListView; 37 mListView = getActivity().getListView(); 42 assertNotNull(mListView); 44 mListView.getSelectedView().getHeight() < mListView.getVerticalFadingEdgeLength()); 46 mListView.getChildCount() < mListView.getAdapter().getCount()); 51 final int numItems = mListView.getAdapter().getCount(); 52 final int listBottom = mListView.getHeight() - mListView.getListPaddingBottom() [all...] |
ListOfItemsShorterThanScreenTest.java | 29 private ListView mListView; 40 mListView = getActivity().getListView(); 45 assertEquals(0, mListView.getSelectedItemPosition()); 46 assertTrue(mListView.getChildAt(0).isSelected()); 47 assertEquals(mListView.getListPaddingTop(), mListView.getSelectedView().getTop()); 52 final View next = mListView.getChildAt(1); 54 final int secondPosition = mListView.getSelectedView().getBottom(); 60 assertEquals(1, mListView.getSelectedItemPosition()); 72 assertEquals(0, mListView.getSelectedItemPosition()) [all...] |
ListOfShortShortTallShortShortTest.java | 27 private ListView mListView; 37 mListView = getActivity().getListView(); 38 mListUtil = new ListUtil(mListView, getInstrumentation()); 43 assertEquals("list item count", 5, mListView.getCount()); 44 assertEquals("list visible child count", 3, mListView.getChildCount()); 45 int firstTwoHeight = mListView.getChildAt(0).getHeight() + mListView.getChildAt(1).getHeight(); 47 firstTwoHeight <= mListView.getVerticalFadingEdgeLength()); 49 firstTwoHeight <= mListView.getMaxScrollAmount()); 61 assertEquals("selected item position", 2, mListView.getSelectedItemPosition()) [all...] |
ListOfShortTallShortTest.java | 26 private ListView mListView; 36 mListView = getActivity().getListView(); 42 mListView.getChildAt(1).getHeight() > mListView.getHeight()); 47 int topBeforeMove = mListView.getChildAt(1).getTop(); 51 1, mListView.getSelectedItemPosition()); 54 mListView.getSelectedView().getTop()); 60 while (mListView.getSelectedItemPosition() != 2 && maxMoves > 0) { 65 mListView.getSelectedItemPosition()); 68 2, mListView.getChildCount()) [all...] |
ListWithScreenOfNoSelectablesTest.java | 28 private ListView mListView; 37 mListView = getActivity().getListView(); 43 mListView.getAdapter().isEnabled(0)); 44 final int numItems = mListView.getCount(); 47 mListView.getAdapter().isEnabled(i)); 50 mListView.getChildCount() < mListView.getCount()); 58 View first = mListView.getChildAt(0); 64 assertEquals("selected position", ListView.INVALID_POSITION, mListView.getSelectedItemPosition()); 65 assertNull("selected view", mListView.getSelectedView()) [all...] |
ListLastItemPartiallyVisibleTest.java | 27 private ListView mListView; 38 mListView = getActivity().getListView(); 39 mListBottom = mListView.getHeight() - mListView.getPaddingBottom(); 45 "in adapter", mListView.getCount(), mListView.getChildCount()); 47 final View lastChild = mListView.getChildAt(mListView.getChildCount() - 1); 50 assertEquals("selected position", 0, mListView.getSelectedItemPosition()); 56 final View firstChild = mListView.getChildAt(0) [all...] |
ListWithNoFadingEdgeTest.java | 29 private ListView mListView; 39 mListView = getActivity().getListView(); 44 assertNotNull(mListView); 45 assertEquals("listview vertical fading edge", 0, mListView.getVerticalFadingEdgeLength()); 47 mListView.getChildCount() < mListView.getCount()); 52 final int numItems = mListView.getCount(); 55 assertEquals("selected position", i, mListView.getSelectedItemPosition()); 58 assertEquals("selected position", numItems - 1, mListView.getSelectedItemPosition()); 63 final int numItems = mListView.getCount() [all...] |
ListItemsExpandOnSelectionTest.java | 27 private ListView mListView; 41 mListView = getActivity().getListView(); 42 mListTop = mListView.getListPaddingTop(); 43 mListBottom = mListView.getHeight() - mListView.getListPaddingBottom(); 44 mExpandedHeight = mListView.getChildAt(0).getHeight(); 45 mNormalHeight = mListView.getChildAt(1).getHeight(); 50 assertEquals(0, mListView.getSelectedItemPosition()); 60 assertEquals(1, mListView.getSelectedItemPosition()); 62 mListTop, mListView.getChildAt(0).getTop()) [all...] |
ListWithSeparatorsTest.java | 27 private ListView mListView; 38 mListView = getActivity().getListView(); 44 assertNotNull(mListView); 45 assertFalse(mListView.getAdapter().areAllItemsEnabled()); 46 assertFalse(mListView.getAdapter().isEnabled(0)); 47 assertFalse(mListView.getAdapter().isEnabled(2)); 48 assertEquals(1, mListView.getSelectedItemPosition()); 55 1, mListView.getSelectedItemPosition()); 58 mListView.getListPaddingTop(), mListView.getChildAt(0).getTop()) [all...] |
ListItemFocusablesFarApartTest.java | 29 private ListView mListView; 40 mListView = getActivity().getListView(); 41 mListTop = mListView.getListPaddingTop(); 42 mListBottom = mListView.getHeight() - mListView.getListPaddingBottom(); 51 return ((ViewGroup) mListView.getChildAt(listIndex)).getChildAt(index); 56 ViewGroup listItem = (ViewGroup) mListView.getChildAt(listIndex); 62 ViewGroup listItem = (ViewGroup) mListView.getChildAt(listIndex); 69 assertNotNull(mListView); 71 1, mListView.getChildCount()) [all...] |
/frameworks/base/core/tests/coretests/src/android/widget/listview/ |
ListGetCheckItemIdsTest.java | 30 private ListView mListView; 40 mListView = getActivity().getListView(); 45 long[] checkItemIds = mListView.getCheckItemIds(); 60 mListView.setChoiceMode(ListView.CHOICE_MODE_NONE); 62 mListView.setItemChecked(0, true); 69 mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); 73 int childCount = mListView.getChildCount(); 75 mListView.setItemChecked(i, true); 81 mListView.setItemChecked(i, true); 82 mListView.setItemChecked((i - 3 + childCount) % childCount, false) [all...] |
ListSetSelectionTest.java | 29 private ListView mListView; 40 mListView = getActivity().getListView(); 46 assertNotNull(mListView); 54 int childCount = mListView.getChildCount(); 56 mListView.setSelection(i); 57 assertEquals("Set selection", i, mListView.getSelectedItemPosition()); 66 mListView.setSelection(0); 67 assertEquals("Set selection", 0, mListView.getSelectedItemPosition()); 70 mListView.setSelection(ListView.INVALID_POSITION); 71 assertEquals("Set selection", 0, mListView.getSelectedItemPosition()) [all...] |
ListFocusableTest.java | 27 private ListView mListView; 38 mListView = getActivity().getListView(); 44 assertNotNull(mListView); 47 assertEquals(0, mListView.getSelectedItemPosition()); 53 assertTrue(mListView.isFocusable()); 59 assertFalse(mListView.isFocusable()); 65 assertFalse(mListView.isFocusable()); 70 assertTrue(mListView.isFocusable()); 73 assertTrue(mListView.isFocusable()); 78 assertTrue(mListView.isFocusable()) [all...] |
ListItemRequestRectAboveThinFirstItemTest.java | 30 private ListView mListView; 38 mListView = getActivity().getListView(); 45 mListView.getChildAt(0).getBottom() < mListView.getVerticalFadingEdgeLength()); 47 mListView.getChildCount() >= 2); 57 assertEquals("selected position", 1, mListView.getSelectedItemPosition()); 59 final View second = mListView.getChildAt(1); 68 mListView.getListPaddingTop(), mListView.getChildAt(0).getTop()); 76 final int secondToLastPos = mListView.getCount() - 2 [all...] |
/cts/tests/src/android/widget/cts/util/ |
ListUtil.java | 28 private final ListView mListView; 36 mListView = listView; 45 mListView.post(new Runnable() { 47 mListView.setSelection(pos); 57 return mListView.getListPaddingTop(); 64 return mListView.getHeight() - mListView.getListPaddingBottom(); 73 if (desiredPos > mListView.getSelectedItemPosition()) { 82 while(mListView.getSelectedItemPosition() < position && --maxDowns > 0) { 85 if (position != mListView.getSelectedItemPosition()) [all...] |
/frameworks/base/core/tests/coretests/src/android/util/ |
ListUtil.java | 30 private final ListView mListView; 38 mListView = listView; 47 mListView.post(new Runnable() { 49 mListView.setSelection(pos); 59 return mListView.getListPaddingTop(); 66 return mListView.getHeight() - mListView.getListPaddingBottom(); 75 if (desiredPos > mListView.getSelectedItemPosition()) { 84 while(mListView.getSelectedItemPosition() < position && --maxDowns > 0) { 87 if (position != mListView.getSelectedItemPosition()) [all...] |
/frameworks/base/core/tests/coretests/src/android/widget/listview/focus/ |
ListWithEditTextHeaderTest.java | 31 private ListView mListView; 40 mListView = getActivity().getListView(); 45 assertTrue("listview.getItemsCanFocus()", mListView.getItemsCanFocus()); 46 assertFalse("out of touch-mode", mListView.isInTouchMode()); 47 assertEquals("header view count", 1, mListView.getHeaderViewsCount()); 48 assertTrue("header does not have focus", mListView.getChildAt(0).isFocused()); 54 TouchUtils.clickView(this, mListView.getChildAt(0)); 55 assertTrue("header does not have focus", mListView.getChildAt(0).isFocused()); 56 assertEquals("something is selected", AbsListView.INVALID_POSITION, mListView.getSelectedItemPosition()); 62 assertEquals("selected position", 1, mListView.getSelectedItemPosition()) [all...] |