Skip to content

用着是挺不错的, 但是我觉得readme还是写的详细一点的好(用法啥都), 不然引到项目里还要研究半天多麻烦 #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
EshelGuo opened this issue Aug 11, 2018 · 1 comment

Comments

@EshelGuo
Copy link

用着是挺不错的, 但是我觉得readme还是写的详细一点的好(用法啥都), 不然引到项目里还要研究半天多麻烦, 最好把联动的java代码贴上去

quickSideBarView.setOnQuickSideBarTouchListener(new OnQuickSideBarTouchListener() {

        private int getPositionByEn(String letter){
            if(mCodes != null){
                for (int i = 0; i < mCodes.size(); i++) {
                    CountryCode code = mCodes.get(i);
                    if(code.en.charAt(0) == letter.charAt(0)){
                        return i;
                    }
                }
            }
            return 0;
        }
        @Override
        public void onLetterChanged(String letter, int position, float y) {
            recyclerView.scrollToPosition(getPositionByEn(letter));//联动
            quickSideBarTipsView.setText(letter,position,y);//联动
        }

        @Override
        public void onLetterTouching(boolean touching) {
            if(!touching)
                quickSideBarTipsView.setText("",0,0);//使文字消失
        }
    });
@saiwu-bigkoo
Copy link
Owner

因为demo都有例子。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants