Home
last modified time | relevance | path

Searched refs:mGridView (Results 1 – 25 of 25) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/widget/gridview/touch/
DGridTouchStackFromBottomTest.java29 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 …]
DGridTouchVerticalSpacingStackFromBottomTest.java33 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 …]
DGridTouchVerticalSpacingTest.java32 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 …]
DGridTouchStackFromBottomManyTest.java30 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 …]
DGridTouchSetSelectionTest.java33 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/
DGridSetSelectionBaseTest.java28 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 …]
DGridPaddingTest.java24 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()
DGridInHorizontalTest.java28 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()
DGridStackFromBottomManyTest.java27 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()
DGridInVerticalTest.java28 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()
DGridStackFromBottomTest.java27 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()
DGridSingleColumnTest.java27 private GridView mGridView; field in GridSingleColumnTest
38 mGridView = getActivity().getGridView(); in setUp()
44 assertNotNull(mGridView); in testPreconditions()
45 assertEquals(0, mGridView.getSelectedItemPosition()); in testPreconditions()
DGridScrollListener.java35 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()
DGridPadding.java30 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()
DGridInHorizontal.java34 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()
DGridInVertical.java34 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()
DGridScrollListenerTest.java31 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/
DGridWidgetTest.java88 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 …]
DGridActivity.java103 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/
DGridScenario.java42 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/
DListRowPresenter.java62 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 …]
DListRowView.java30 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()
DVerticalGridPresenter.java81 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/
DGridLayoutTest.java48 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/
DPaletteDetailActivity.java52 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()