/frameworks/base/core/tests/coretests/src/android/widget/gridview/touch/ |
D | GridTouchStackFromBottomTest.java | 29 private GridView mGridView; field in GridTouchStackFromBottomTest 40 mGridView = getActivity().getGridView(); in setUp() 46 assertNotNull(mGridView); in testPreconditions() 49 assertEquals(mGridView.getAdapter().getCount() - 1, mGridView.getSelectedItemPosition()); in testPreconditions() 54 TouchUtils.scrollToBottom(this, mGridView); in testPushUp() 58 mGridView.getSelectedItemPosition()); in testPushUp() 60 View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); in testPushUp() 63 mGridView.getAdapter().getCount() - 1, lastChild.getId()); in testPushUp() 66 mGridView.getHeight() - mGridView.getListPaddingBottom(), lastChild.getBottom()); in testPushUp() 71 TouchUtils.scrollToTop(this, mGridView); in testPullDown() [all …]
|
D | GridTouchVerticalSpacingStackFromBottomTest.java | 33 private GridView mGridView; field in GridTouchVerticalSpacingStackFromBottomTest 45 mGridView = getActivity().getGridView(); in setUp() 53 assertNotNull(mGridView); in testPreconditions() 56 assertEquals(mGridView.getAdapter().getCount() - 1, mGridView.getSelectedItemPosition()); in testPreconditions() 62 View firstChild = mGridView.getChildAt(0); in testNoScroll() 63 View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); in testNoScroll() 70 View newLastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); in testNoScroll() 73 assertEquals("Wrong view in last position", mGridView.getAdapter().getCount() - 1, in testNoScroll() 80 View firstChild = mGridView.getChildAt(0); in testShortScroll() 81 if (firstChild.getTop() < this.mGridView.getListPaddingTop()) { in testShortScroll() [all …]
|
D | GridTouchVerticalSpacingTest.java | 32 private GridView mGridView; field in GridTouchVerticalSpacingTest 43 mGridView = getActivity().getGridView(); in setUp() 49 assertNotNull(mGridView); in testPreconditions() 51 assertEquals(0, mGridView.getSelectedItemPosition()); in testPreconditions() 56 View firstChild = mGridView.getChildAt(0); in testNoScroll() 57 View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); in testNoScroll() 64 View newFirstChild = mGridView.getChildAt(0); in testNoScroll() 73 View firstChild = mGridView.getChildAt(0); in testShortScroll() 74 View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1); in testShortScroll() 81 View newFirstChild = mGridView.getChildAt(0); in testShortScroll() [all …]
|
D | GridTouchStackFromBottomManyTest.java | 30 private GridView mGridView; field in GridTouchStackFromBottomManyTest 41 mGridView = getActivity().getGridView(); in setUp() 47 assertNotNull(mGridView); in testPreconditions() 50 assertEquals(mGridView.getAdapter().getCount() - 1, mGridView.getSelectedItemPosition()); in testPreconditions() 56 TouchUtils.scrollToTop(this, mGridView); in testScrollToTop() 60 mGridView.getSelectedItemPosition()); in testScrollToTop() 62 firstChild = mGridView.getChildAt(0); in testScrollToTop() 67 mGridView.getListPaddingTop(), firstChild.getTop()); in testScrollToTop() 72 TouchUtils.scrollToBottom(this, mGridView); in testScrollToBottom() 76 mGridView.getSelectedItemPosition()); in testScrollToBottom() [all …]
|
D | GridTouchSetSelectionTest.java | 33 private GridView mGridView; field in GridTouchSetSelectionTest 44 mGridView = getActivity().getGridView(); in setUp() 50 assertNotNull(mGridView); in testPreconditions() 60 mGridView.getSelectedItemPosition()); in testSetSelection() 62 final int targetPosition = mGridView.getAdapter().getCount() / 2; in testSetSelection() 66 mGridView.setSelection(targetPosition); in testSetSelection() 72 int childCount = mGridView.getChildCount(); in testSetSelection() 74 View child = mGridView.getChildAt(i); in testSetSelection()
|
/frameworks/base/core/tests/coretests/src/android/widget/gridview/ |
D | GridSetSelectionBaseTest.java | 28 private GridView mGridView; field in GridSetSelectionBaseTest 39 mGridView = getActivity().getGridView(); in setUp() 45 assertNotNull(mGridView); in testPreconditions() 48 if (mGridView.isStackFromBottom()) { in testPreconditions() 49 assertEquals(mGridView.getAdapter().getCount() - 1, in testPreconditions() 50 mGridView.getSelectedItemPosition()); in testPreconditions() 52 assertEquals(0, mGridView.getSelectedItemPosition()); in testPreconditions() 58 final int target = mGridView.getAdapter().getCount() - 1; in testSetSelectionToTheEnd() 61 mGridView.setSelection(target); in testSetSelectionToTheEnd() 66 assertEquals(mGridView.getSelectedItemPosition(), target); in testSetSelectionToTheEnd() [all …]
|
D | GridPaddingTest.java | 24 private GridView mGridView; field in GridPaddingTest 35 mGridView = getActivity().getGridView(); in setUp() 40 assertNotNull(mGridView); in testPreconditions() 41 assertTrue("Not in touch mode", mGridView.isInTouchMode()); in testPreconditions() 47 assertEquals("The first item should be selected", mGridView.getSelectedItemPosition(), 0); in testResurrectSelection()
|
D | GridInHorizontalTest.java | 28 private GridView mGridView; field in GridInHorizontalTest 39 mGridView = getActivity().getGridView(); in setUp() 45 assertNotNull(mGridView); in testPreconditions() 46 assertTrue("Grid has 0 width", mGridView.getMeasuredWidth() > 0); in testPreconditions() 47 assertTrue("Grid has 0 height", mGridView.getMeasuredHeight() > 0); in testPreconditions()
|
D | GridStackFromBottomManyTest.java | 27 private GridView mGridView; field in GridStackFromBottomManyTest 38 mGridView = getActivity().getGridView(); in setUp() 44 assertNotNull(mGridView); in testPreconditions() 47 assertEquals(mGridView.getAdapter().getCount() - 1, mGridView.getSelectedItemPosition()); in testPreconditions()
|
D | GridInVerticalTest.java | 28 private GridView mGridView; field in GridInVerticalTest 39 mGridView = getActivity().getGridView(); in setUp() 45 assertNotNull(mGridView); in testPreconditions() 46 assertTrue("Grid has 0 width", mGridView.getMeasuredWidth() > 0); in testPreconditions() 47 assertTrue("Grid has 0 height", mGridView.getMeasuredHeight() > 0); in testPreconditions()
|
D | GridStackFromBottomTest.java | 27 private GridView mGridView; field in GridStackFromBottomTest 38 mGridView = getActivity().getGridView(); in setUp() 44 assertNotNull(mGridView); in testPreconditions() 47 assertEquals(mGridView.getAdapter().getCount() - 1, mGridView.getSelectedItemPosition()); in testPreconditions()
|
D | GridSingleColumnTest.java | 27 private GridView mGridView; field in GridSingleColumnTest 38 mGridView = getActivity().getGridView(); in setUp() 44 assertNotNull(mGridView); in testPreconditions() 45 assertEquals(0, mGridView.getSelectedItemPosition()); in testPreconditions()
|
D | GridScrollListener.java | 35 GridView mGridView; field in GridScrollListener 50 mGridView = findViewById(R.id.grid); in onCreate() 51 mGridView.setAdapter(new ArrayAdapter<String>(this, in onCreate() 54 mGridView.setOnScrollListener(this); in onCreate() 58 return mGridView; in getGridView()
|
D | GridPadding.java | 30 private GridView mGridView; field in GridPadding 43 mGridView = findViewById(R.id.grid); in onCreate() 44 mGridView.setAdapter(new ArrayAdapter<String>(this, in onCreate() 49 return mGridView; in getGridView()
|
D | GridInHorizontal.java | 34 GridView mGridView; field in GridInHorizontal 49 mGridView = (GridView) findViewById(R.id.grid); in onCreate() 50 mGridView.setAdapter(new ArrayAdapter<String>(this, in onCreate() 56 return mGridView; in getGridView()
|
D | GridInVertical.java | 34 GridView mGridView; field in GridInVertical 49 mGridView = (GridView) findViewById(R.id.grid); in onCreate() 50 mGridView.setAdapter(new ArrayAdapter<String>(this, in onCreate() 56 return mGridView; in getGridView()
|
D | GridScrollListenerTest.java | 31 private GridView mGridView; field in GridScrollListenerTest 45 mGridView = getActivity().getGridView(); in setUp() 46 mGridView.setOnScrollListener(this); in setUp() 52 assertNotNull(mGridView); in testPreconditions() 61 mActivity.runOnUiThread(() -> mGridView.requestFocus()); in testKeyScrolling()
|
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/ |
D | GridWidgetTest.java | 88 protected BaseGridView mGridView; field in GridWidgetTest 160 mGridView.setSelectedPosition(position, scrollExtra); in setSelectedPosition() 174 mGridView.setSelectedPositionSmooth(position); in setSelectedPositionSmooth() 192 } while (mGridView.getLayoutManager().isSmoothScrolling() in scroll() 193 || mGridView.getScrollState() != BaseGridView.SCROLL_STATE_IDLE); in scroll() 202 if (mGridView.getLayoutDirection() == ViewGroup.LAYOUT_DIRECTION_RTL) { in scrollToBegin() 210 if (mGridView.getLayoutDirection() == ViewGroup.LAYOUT_DIRECTION_RTL) { in scrollToBegin() 227 if (mGridView.getLayoutDirection() == ViewGroup.LAYOUT_DIRECTION_RTL) { in scrollToEnd() 235 if (mGridView.getLayoutDirection() == ViewGroup.LAYOUT_DIRECTION_RTL) { in scrollToEnd() 252 for (int i = 0; i < mGridView.getChildCount(); i++) { in sortByRows() [all …]
|
D | GridActivity.java | 103 BaseGridView mGridView; field in GridActivity 115 mGridView = (BaseGridView) view.findViewById(R.id.gridview); in createView() 116 mOrientation = mGridView instanceof HorizontalGridView ? BaseGridView.HORIZONTAL : in createView() 118 mGridView.setWindowAlignment(BaseGridView.WINDOW_ALIGN_BOTH_EDGE); in createView() 119 mGridView.setWindowAlignmentOffsetPercent(35); in createView() 120 mGridView.setOnChildSelectedListener(new OnChildSelectedListener() { in createView() 127 mGridView.setLayoutMode(ViewGroup.LAYOUT_MODE_OPTICAL_BOUNDS); in createView() 198 mGridView.setAdapter(adapter); in onCreate() 203 mGridView.setAdapter(new MyAdapter()); in rebindToNewAdapter() 212 mGridView.setSelectedPosition(position); in onNewIntent() [all …]
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | GridScenario.java | 42 private GridView mGridView; field in GridScenario 63 return mGridView; in getGridView() 243 mGridView = new GridView(this); in onCreate() 244 mGridView.setLayoutParams(new ViewGroup.LayoutParams( in onCreate() 247 mGridView.setDrawSelectorOnTop(false); in onCreate() 249 mGridView.setNumColumns(mNumColumns); in onCreate() 252 mGridView.setColumnWidth(mColumnWidth); in onCreate() 255 mGridView.setVerticalSpacing(mVerticalSpacing); in onCreate() 257 mGridView.setStretchMode(mStretchMode); in onCreate() 258 mGridView.setAdapter(createAdapter()); in onCreate() [all …]
|
/frameworks/support/leanback/src/main/java/androidx/leanback/widget/ |
D | ListRowPresenter.java | 62 final HorizontalGridView mGridView; field in ListRowPresenter.ViewHolder 72 mGridView = gridView; in ViewHolder() 74 mPaddingTop = mGridView.getPaddingTop(); in ViewHolder() 75 mPaddingBottom = mGridView.getPaddingBottom(); in ViewHolder() 76 mPaddingLeft = mGridView.getPaddingLeft(); in ViewHolder() 77 mPaddingRight = mGridView.getPaddingRight(); in ViewHolder() 93 return mGridView; in getGridView() 109 return mGridView.getSelectedPosition(); in getSelectedPosition() 119 ItemBridgeAdapter.ViewHolder ibvh = (ItemBridgeAdapter.ViewHolder) mGridView in getItemViewHolder() 134 ItemBridgeAdapter.ViewHolder ibvh = (ItemBridgeAdapter.ViewHolder) mGridView in getSelectedItem() [all …]
|
D | ListRowView.java | 30 private HorizontalGridView mGridView; field in ListRowView 46 mGridView = (HorizontalGridView) findViewById(R.id.row_content); in ListRowView() 48 mGridView.setHasFixedSize(false); in ListRowView() 61 return mGridView; in getGridView()
|
D | VerticalGridPresenter.java | 81 final VerticalGridView mGridView; field in VerticalGridPresenter.ViewHolder 86 mGridView = view; in ViewHolder() 90 return mGridView; in getGridView() 269 Context context = vh.mGridView.getContext(); in initializeGridViewHolder() 285 mShadowOverlayHelper.prepareParentForShadow(vh.mGridView); in initializeGridViewHolder() 404 holder.mGridView.setChildrenVisibility(afterEntrance? View.VISIBLE : View.INVISIBLE); in setEntranceTransitionState()
|
/frameworks/support/gridlayout/src/androidTest/java/androidx/gridlayout/widget/ |
D | GridLayoutTest.java | 48 View mGridView; field in GridLayoutTest 71 mGridView = activity.findViewById(R.id.gridView); in setContentView() 82 int total = mGridView.getWidth(); in testUseDefaultMargin() 95 int total = mGridView.getWidth(); in testImplicitFillHorizontal() 108 int total = mGridView.getWidth(); in testMakeViewGone() 133 int total = mGridView.getHeight(); in testWrapContentInOtherDirection() 139 total < ((ViewGroup) mGridView.getParent()).getHeight()); in testWrapContentInOtherDirection()
|
/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/graphics/ |
D | PaletteDetailActivity.java | 52 private GridView mGridView; field in PaletteDetailActivity 67 mGridView = findViewById(R.id.palette); in onCreate() 69 mGridView.setAdapter(mSwatchesPalette); in onCreate() 72 mGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { in onCreate()
|