@TargetApi(JELLY_BEAN) public S isNotScrollContainer() { isNotNull(); assertThat(actual.isScrollContainer()) // .overridingErrorMessage("Expected to not be a scroll container but was") // .isFalse(); return myself; }
@TargetApi(JELLY_BEAN) public S isScrollContainer() { isNotNull(); assertThat(actual.isScrollContainer()) // .overridingErrorMessage("Expected to be a scroll container but was not") // .isTrue(); return myself; }
public boolean isScrollable() { return view.isScrollContainer(); }
@TargetApi(JELLY_BEAN) public S isNotScrollContainer() { isNotNull(); assertThat(actual.isScrollContainer()) // .overridingErrorMessage("Expected to not be a scroll container but was") // .isFalse(); return myself; }
@TargetApi(JELLY_BEAN) public S isScrollContainer() { isNotNull(); assertThat(actual.isScrollContainer()) // .overridingErrorMessage("Expected to be a scroll container but was not") // .isTrue(); return myself; }
/** * Determines if the supplied {@link View} is a top-level item within a scrollable container. * * @param view The {@link View} to evaluate * @return {@code true} if {@code view} is a top-level view within a scrollable container, * {@code false} otherwise */ private static boolean isChildOfScrollableContainer(View view) { if (view == null) { return false; } ViewParent viewParent = view.getParentForAccessibility(); if ((viewParent == null) || !(viewParent instanceof View)) { return false; } View parent = (View) viewParent; if (parent.isScrollContainer()) { return true; } // Specifically check for parents that are AdapterView, ScrollView, or HorizontalScrollView, but // exclude Spinners, which are a special case of AdapterView. return (((parent instanceof AdapterView) || (parent instanceof ScrollView) || (parent instanceof HorizontalScrollView)) && !(parent instanceof Spinner)); }
data.put("ScrollBarFadeDuration", v.getScrollBarFadeDuration()); data.put("ScrollBarSize", v.getScrollBarSize()); data.put("IsScrollContainer", v.isScrollContainer()); data.put("ParentForAccessibility", String.valueOf(v.getParentForAccessibility()));//16 data.put("WindowSystemUiVisibility", v.getWindowSystemUiVisibility());//16;