Android (list) views scroll as Sense UI

I searched for a while on google and on stackoverflow, but I cannot find a solution. Is there any way to get list correspondence on Android 2.2 or 2.1, as uu does? Like here in my alarm: AlarmView user interface

+5
source share
5 answers

I am shocked that Chirag replied that he was very much appreciated. This is not useful to anyone, because it is incomplete and does not build. He also does not quote his source.

Source code can be found here: http://code.google.com/p/scroll-pager/

, - GPL.

: , MIT.

+14
+1

http://developer.android.com/reference/android/widget/ScrollView.html

ScrollView ListView, ListView . , ListView , ListView , ScrollView.

+1

, , GitHub, ​​.

It basically provides an iOS-like scroll effect for many of the main scrollable Android views - ListView is one of them and is very easy to use.

In particular, to view the list, all you need to do to enable this:

ListView listView = ... // For example: (ListView) findViewById(R.id.list_view);
OverScrollDecoratorHelper.setUpOverScroll(listView);

And to include the project in yours, add it to your build.gradle file:

dependencies {
    // ...

    compile 'me.everything:overscroll-decor-android:1.0.0'
}
+1
source

Define scrollview in your xml file.

Then in your java file, skip this:

scrollView = (ScrollView) findViewById(R.id.scr);
    contentView = (ViewGroup) findViewById(R.id.r2);
    scrollView.setOnTouchListener(new ScrollPager(scrollView, contentView));
    scrollView.post(new Runnable() {
        public void run() {
            scrollView.scrollTo(0, contentView.getPaddingTop());
        }
    });

And add the class to the java file above:

public class ScrollPager implements OnTouchListener
public ScrollPager(ScrollView aScrollView, ViewGroup aContentView)
    {
        mScrollView = aScrollView;
        mContentView = aContentView;
        scroller = new Scroller(mScrollView.getContext(), new OvershootInterpolator());
        task = new Runnable()
        {
            public void run()
            {
                scroller.computeScrollOffset();
                mScrollView.scrollTo(0, scroller.getCurrY());

                if (!scroller.isFinished())
                {
                    mScrollView.post(this);
                }
            }
        };
    }
-5
source

All Articles