Java Code Examples for android.view.View#setOverScrollMode()

The following examples show how to use android.view.View#setOverScrollMode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ELinkageScrollLayout.java    From ELinkageScroll with Apache License 2.0 6 votes vote down vote up
@Override
protected void onFinishInflate() {
    super.onFinishInflate();

    int count = getChildCount();
    for (int i = 0; i < count; i++) {
        View child = getChildAt(i);
        child.setVerticalScrollBarEnabled(false);
        child.setHorizontalScrollBarEnabled(false);
        if (!(child instanceof ILinkageScroll)) {
            throw new RuntimeException("Child in LinkageScrollLayout must implement ILinkageScroll");
        }
        ((ILinkageScroll) child).setChildLinkageEvent(mChildLinkageEvent);
        child.setOverScrollMode(OVER_SCROLL_NEVER);
    }
}
 
Example 2
Source File: VCanPullUtil.java    From PullRefreshView with Apache License 2.0 6 votes vote down vote up
public static VPullable getPullAble(View view) {
    if (view == null) {
        return null;
    }
    view.setOverScrollMode(View.OVER_SCROLL_NEVER);
    if (view instanceof VPullable) {
        return (VPullable) view;
    } else if (view instanceof AbsListView) {
        return new AbsListViewCanPull((AbsListView) view);
    } else if (view instanceof ScrollView || view instanceof NestedScrollView) {
        return new ScrollViewCanPull((ViewGroup) view);
    } else if (view instanceof WebView) {
        return new WebViewCanPull((WebView) view);
    } else if (view instanceof RecyclerView) {
        return new RecyclerViewCanPull((RecyclerView) view);
    }
    return null;
}
 
Example 3
Source File: MainActivity.java    From LefishGuide with Apache License 2.0 5 votes vote down vote up
void clearOverScrollEffect(View view) {

        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.FROYO) {
            view.setOverScrollMode(View.OVER_SCROLL_NEVER);
            view.setHorizontalFadingEdgeEnabled(false);
            view.setVerticalFadingEdgeEnabled(false);
        }
    }
 
Example 4
Source File: HCanPullUtil.java    From PullRefreshView with Apache License 2.0 5 votes vote down vote up
public static HPullable getPullAble(View view) {
    if (view == null) {
        return null;
    }
    view.setOverScrollMode(View.OVER_SCROLL_NEVER);
    if (view instanceof HPullable) {
        return (HPullable) view;
    } else if (view instanceof ScrollView || view instanceof NestedScrollView) {
        return new ScrollViewCanPull((ViewGroup) view);
    } else if (view instanceof RecyclerView) {
        return new RecyclerViewCanPull((RecyclerView) view);
    }
    return null;
}
 
Example 5
Source File: ViewCompatGingerbread.java    From letv with Apache License 2.0 4 votes vote down vote up
public static void setOverScrollMode(View v, int mode) {
    v.setOverScrollMode(mode);
}
 
Example 6
Source File: aj.java    From MiBandDecompiled with Apache License 2.0 4 votes vote down vote up
public static void a(View view, int i)
{
    view.setOverScrollMode(i);
}
 
Example 7
Source File: ViewCompatGingerbread.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static void setOverScrollMode(View v, int mode) {
    v.setOverScrollMode(mode);
}
 
Example 8
Source File: ViewCompatGingerbread.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static void setOverScrollMode(View v, int mode) {
    v.setOverScrollMode(mode);
}
 
Example 9
Source File: ViewCompatGingerbread.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public static void setOverScrollMode(View v, int mode) {
    v.setOverScrollMode(mode);
}
 
Example 10
Source File: ViewCompatGingerbread.java    From guideshow with MIT License 4 votes vote down vote up
public static void setOverScrollMode(View v, int mode) {
    v.setOverScrollMode(mode);
}