Need help with GBSlideBar?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

edanel
125 Stars 42 Forks Apache License 2.0 15 Commits 0 Opened issues

Description

类似uber/滴滴等app的滑动选择工具条

Services available

!
?

Need anything else?

Contributors list

# 384,189
Java
13 commits
# 1,584
image-f...
assembl...
netfram...
residua...
1 commit

GBSlideBar 滑动选择控件

[项目不再维护,有需要的可自行根据需求对源码进行修改] 类似uber的滑动选择工具条

效果图

animation

使用

    

    private GBSlideBar gbSlideBar;
    private SlideAdapter mAdapter;
       gbSlideBar = (GBSlideBar) findViewById(R.id.gbslidebar);

    Resources resources = getResources();
    mAdapter = new SlideAdapter(resources, new int[]{
            R.drawable.btn_tag_selector,
            R.drawable.btn_more_selector,
            R.drawable.btn_reject_selector});

    mAdapter.setTextColor(new int[]{
            Color.GREEN,
            Color.BLUE,
            Color.RED
    });

    gbSlideBar.setAdapter(mAdapter);
    gbSlideBar.setPosition(2);
    gbSlideBar.setOnGbSlideBarListener(new GBSlideBarListener() {
        @Override
        public void onPositionSelected(int position) {
            Log.d("edanelx","selected "+position);
        }
    });

引用

    allprojects {
        repositories {
            ...
            maven { url "https://jitpack.io" }
        }
    }
    dependencies {
            compile 'com.github.edanel:GBSlideBar:0.5'
    }

其他

参考:android-phased-seek-bar

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.