# GBSlideBar **Repository Path**: applibgroup/GBSlideBar ## Basic Information - **Project Name**: GBSlideBar - **Description**: Slide selection tool bar for apps like Uber/Drip - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-16 - **Last Updated**: 2021-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README GBSlideBar ================= Introduction ------------ HMOS library which handles custom animation for sliding selection toolbar Source ------------ The code in this repository was inspired from [edanel/GBSlideBar](https://github.com/edanel/GBSlideBar). We are very thankful to edanel. Demo ------------ ![animation](https://raw.githubusercontent.com/edanel/GBSlideBar/master/screenshot/preview-480.gif) Installation ------------ In order to use the library, add the following line to your **root** gradle file: I) For using GBSlideBar module in sample app, include the source code and add the below dependencies in entry/build.gradle to generate hap/support.har. ``` dependencies { implementation project(':slidebar') implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) testImplementation 'junit:junit:4.13' } ``` II) For using GBSlideBar in separate application using har file, add the har file in the entry/libs folder and add the dependencies in entry/build.gradle file. ``` dependencies { implementation fileTree(dir: 'libs', include: ['*.har']) testImplementation 'junit:junit:4.12' } ``` Usage ----- I) Declare Custom GBSlideBar in XML (see xml attributes below for customization): II) Usage in java GBSlideBar gbSlideBar; SlideAdapter mAdapter; gbSlideBar= (GBSlideBar) findComponentById(ResourceTable.Id_gbslidebar); ResourceManager resourceManager=this.getResourceManager(); mAdapter = new SlideAdapter(MainAbilitySlice.this,resourceManager , new int[]{ ResourceTable.Graphic_btn_tag_selector, ResourceTable.Graphic_btn_more_selector, ResourceTable.Graphic_btn_reject_selector }); mAdapter.setTextColor(new Color[]{ Color.GREEN, Color.BLUE, Color.RED }); gbSlideBar.registerDrawTask(); gbSlideBar.setAdapter(mAdapter); gbSlideBar.setPosition(2); gbSlideBar.setOnGbSlideBarListener(position -> { HiLog.debug(LABEL_LOG, "position selected", ""); });