No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit a4aacb0 Jun 7, 2017
Permalink
Failed to load latest commit information.
app
gradle/wrapper fix gradle Jun 6, 2017
preview Initial commit May 31, 2016
wave
.gitignore Initial commit May 31, 2016
README.md add version judgment Sep 17, 2016
build.gradle
gradle.properties Initial commit May 31, 2016
gradlew Initial commit May 31, 2016
gradlew.bat Initial commit May 31, 2016
settings.gradle Initial commit May 31, 2016

README.md

WaveSideBar project

一个快速跳跃分组的侧边栏控件,示例中配合RecyclerView实现。

波浪的实现采用了三段二次贝塞尔曲线,附一张手稿草图,仅供参考。

Usage

use WaveSideBarView in the layout file

    <cc.solart.wave.WaveSideBarView
        android:id="@+id/side_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

set OnTouchLetterChangeListener

    mSideBarView.setOnTouchLetterChangeListener(new WaveSideBarView.OnTouchLetterChangeListener() {
            @Override
            public void onLetterChange(String letter) {
                int pos = adapter.getLetterPosition(letter);

                if (pos != -1) {
                    mRecyclerView.scrollToPosition(pos);
                }
            }
        });

Thanks

used PinnedHeaderDecoration in RecyclerItemDecoration

License

No fucking license. just enjoy it!