在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):turing-tech/MaterialScrollBar开源软件地址(OpenSource Url):https://github.com/turing-tech/MaterialScrollBar开源编程语言(OpenSource Language):Java 100.0%开源软件介绍(OpenSource Introduction):MaterialScrollBarDEPRECIATEDMaterialScrollBar has been moved to MaterialScrollbar2. MaterialScrollbar2 has been re-written in Kotlin and should be generally faster and easier to use. This repo will be moved over to that address in the coming months. See you there! An Android library that brings the Material Design 5.1 scrollbar to pre-5.1 devices. Designed for Android's Google Play - Test Out the App Table of ContentsGradleallprojects {
repositories {
maven { url 'https://jitpack.io' }
}
} dependencies {
// Will be moved to 'com.github.wynneplaga:MaterialScrollBar:13.+' on July 1, 2022
// If it is after the date, update the line below
implementation 'com.github.turing-tech:MaterialScrollBar:13.+'
} DocumentationNote: All customisation methods ( How to useThe 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:
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 * 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. IndicatorsTo add an indicator, simply add the following line of code: scrollBar.setIndicator({{Indicator}}, {{addSpace}}); The indicator should be either
To use an indicator, you MUST make your Specific IndicatorsAlphabetIndicator Required Interface: To implement an ...setIndicator(new AlphabetIndicator(this)); DateAndTimeIndicator Required Interface: To implement a ...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 CustomIndicator Required Interface: To implement a ...setIndicator(new CustomIndicator(this)); LicenseMaterial Scroll Bar:
RecyclerView-FastScroll:
Launcher 3:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论