All Projects → turing-tech → Materialscrollbar

turing-tech / Materialscrollbar

Licence: apache-2.0
An Android library that brings the Material Design 5.1 sidebar to pre-5.1 devices.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Materialscrollbar

Android Extensions
An Android library with modules to quickly bootstrap an Android application.
Stars: ✭ 356 (-53.22%)
Mutual labels:  material-design, material, recyclerview
Togglebuttons
Android toggle buttons that adhere to the Material Design documentation.
Stars: ✭ 88 (-88.44%)
Mutual labels:  material-design, material, ui-components
Vuetify
🐉 Material Component Framework for Vue
Stars: ✭ 33,085 (+4247.57%)
Mutual labels:  material-design, material, ui-components
Smart Webcomponents
Web Components & Custom Elements for Professional Web Applications
Stars: ✭ 110 (-85.55%)
Mutual labels:  material-design, material, ui-components
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (-70.96%)
Mutual labels:  material-design, material, ui-components
Material
A lightweight Material Design library for Angular based on Google's Material Components for the Web.
Stars: ✭ 143 (-81.21%)
Mutual labels:  material-design, material, ui-components
Android Art
🎄 Android™ 设计相关的在线工具: 图标制作、配色方案、尺寸修改、截图加壳等,持续更新...
Stars: ✭ 95 (-87.52%)
Mutual labels:  material-design, material, ui-components
Material Bread
Cross Platform React Native Material Design Components
Stars: ✭ 287 (-62.29%)
Mutual labels:  material-design, material, ui-components
Svelte Materialify
A Material UI Design Component library for Svelte heavily inspired by vuetify.
Stars: ✭ 351 (-53.88%)
Mutual labels:  material-design, material, ui-components
Material Viewpagerindicator
Dot-based Android ViewPager indicator with Material Design animations.
Stars: ✭ 511 (-32.85%)
Mutual labels:  material-design, material
Materialdesignextensions
Material Design Extensions is based on Material Design in XAML Toolkit to provide additional controls and features for WPF apps
Stars: ✭ 516 (-32.19%)
Mutual labels:  material-design, material
Light
🍭 The usual Snackbar, but elegant
Stars: ✭ 542 (-28.78%)
Mutual labels:  material-design, ui-components
Material Axure Library
An Axure widget library based on Google Material Design.
Stars: ✭ 490 (-35.61%)
Mutual labels:  material-design, material
Snacky
Snacky is a small library to help you adding a Snackbar to your android project.
Stars: ✭ 482 (-36.66%)
Mutual labels:  material-design, ui-components
Android Iconics
Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
Stars: ✭ 4,916 (+545.99%)
Mutual labels:  material-design, material
Material Components Ios
[In maintenance mode] Modular and customizable Material Design UI components for iOS
Stars: ✭ 4,484 (+489.22%)
Mutual labels:  material-design, material
Taptargetview
An implementation of tap targets from the Material Design guidelines for feature discovery.
Stars: ✭ 5,114 (+572.01%)
Mutual labels:  material-design, material
Material Design Template
Material Design Based One Page HTML Template
Stars: ✭ 572 (-24.84%)
Mutual labels:  material-design, material
Gatsby Material Starter
A high performance blog starter with Material design in mind for GatsbyJS.
Stars: ✭ 456 (-40.08%)
Mutual labels:  material-design, material
Angular Mdc Web
Angular wrapper for Material Design (Web) Components
Stars: ✭ 542 (-28.78%)
Mutual labels:  material-design, material

MaterialScrollBar

Apache 2.0 Version Android Arsenal

An Android library that brings the Material Design 5.1 scrollbar to pre-5.1 devices. Designed for Android's recyclerView.

Video

Image Preview

Google Play - Test Out the App

Donate

Table of Contents

  1. Gradle
  2. Documentation
    1. How to use
    2. My recyclerView elements aren't all the same size! What do I do?
    3. Indicators
    4. Specific Indicators
  3. License

Gradle

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}
dependencies {
    implementation 'com.github.turing-tech:MaterialScrollBar:13.+'
}

Documentation

Note: All customisation methods (setAutoHide, setBarColor, etc) return the materialScrollBar, so they can be chained together if wanted. Alternatively, you can just operate on a variable.

How to use

The library comes in two flavours, drag and touch. Try both out to see which you prefer.

Option 1 - Drag

<com.turingtechnologies.materialscrollbar.DragScrollBar
    android:id="@+id/dragScrollBar"
    android:layout_width="wrap_content"
    app:msb_recyclerView="@id/recyclerView"
    app:msb_lightOnTouch="[[boolean]]"
    android:layout_height="match_parent" />

or

Option 2 - Touch

<com.turingtechnologies.materialscrollbar.TouchScrollBar
    android:id="@+id/touchScrollBar"
    android:layout_width="wrap_content"
    app:msb_recyclerView="@id/recyclerView"
    app:msb_lightOnTouch="[[boolean]]"
    android:layout_height="match_parent" />

Additonal optional attributes:

  • msb_handleColor - Color
  • msb_barColor - Color
  • msb_handleOffColor - Color
  • msb_textColor - Color
  • msb_barThickness - Integer
  • msb_rightToLeft - Boolean

Please note that for both of these configurations, both recyclerView and lightOnTouch* must have a valid value. The recyclerView attribute should point to the id of the recyclerView to which you want to link the scrollbar.

* lightOnTouch behaves like this: A value of true will cause the handle to be grey until pressed, when it will become the normal accent color (as set). A value of false will cause the handle to always have the accent color, even when not being pressed.


My recyclerView elements aren't all the same size! What do I do?

If you are in the situation of using headers of one size and elements of another, we've developed a solution speicifcally for you. Please follow the tutorial here.

If you are in some other situation where you're elements are differently sized, implement ICustomScroller in your adapter and complete the included methods.


Indicators

To add an indicator, simply add the following line of code:

scrollBar.setIndicator({{Indicator}}, {{addSpace}});

The indicator should be either AlphatbetIndicator, DateAndTimeIndicator, or CustomIndicator. See below for specific instructions per indicator.

{{addSpace}} is a boolean which indicates whether there should be space in between the indicator and the bar. True adds space, as in the latest version of the Google Launcher, while false adds no space, as in the Android 5.1 system scrollbars.

To use an indicator, you MUST make your recyclerView's adapter implement the relevant interface. If you do not, the library will throw a runtime error informing you of your mistake. See documentation for the relevant interface.


Specific Indicators

AlphabetIndicator

Required Interface: INameableAdapter

To implement an AlphabetIndicator, which displays one character usually corresponding to the first letter of each item, add the following to the end of your scroll bar instantiation, or add it as a seperate line.

...setIndicator(new AlphabetIndicator(this));

DateAndTimeIndicator

Required Interface: IDateableAdapter

To implement a DateAndTimeIndicator, which displays any combination of time, day of the month, month, and year, add the following to the end of your scroll bar instantiation, or add it as a seperate line.

...setIndicator(new DateAndTimeIndicator(this, {{includeYear}}, {{includeMonth}}, {{includeDay}}, {{includeTime}}));

All of the arguments are booleans (except for this first one obviously). The indicator will dynamically size, add punctuation, and localise for you. All you need to do is provide a Date object for each element in your adapter. You should almost always use miliseconds since the epoch unless you have a good reason not to. Otherwise, the library might crash.

CustomIndicator

Required Interface: ICustomAdapter

To implement a CustomIndicator, which displays any text you want, add the following to the end of your scroll bar instantiation, or add it as a seperate line.

...setIndicator(new CustomIndicator(this));

License

Material Scroll Bar:

Copyright 2016-2017 Turing Technologies, an unincorporated orginisation of Wynne Plaga.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This licensing is applicable to all code offered as part of this
repository, which can be identified by the lisence notice preceding
the content AND/OR by its inclusion in a package starting with "com.
turingtechnologies.materialscrollbar".

RecyclerView-FastScroll:

 Copyright (C) 2016 Tim Malseed

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Launcher 3:

 Copyright (C) 2010 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].