You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: All customisation methods (setAutoHide, setBarColour, etc) return the materialScrollBar, so they can be chained together if wanted. Alternativly, you can just operate on a variable.
@@ -54,7 +54,7 @@ For devices running Lollipop and above, the accent colour will be read automatic
54
54
55
55
Also note that the library does not currently support recyclerViews which do not boarder the screen's edge on the right side.
56
56
57
-
###How to use - Section Indicator
57
+
##How to use - Section Indicator
58
58
59
59
To add a section indicator, simply add the following line of code:
60
60
@@ -66,8 +66,8 @@ The section indicator should be either AlphatbetIndicator, DateAndTimeIndicator,
66
66
67
67
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.
68
68
69
-
###Indicators
70
-
####AlphabetIndicator
69
+
##Indicators
70
+
###AlphabetIndicator
71
71
72
72
**Required Interface:** INameableAdapter
73
73
@@ -76,7 +76,7 @@ To implement an AlphabetIndicator, which displays one character usually correspo
@@ -87,14 +87,62 @@ To implement a DateAndTimeIndicator, which displays any combination of time, day
87
87
88
88
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.
89
89
90
+
###CustomIndicator
91
+
92
+
**Required Interface:** ICustomAdapter
93
+
94
+
To implement a CustomIndicator, which displays any text you want, add the following to the end of your materialScrollBar instantiation, or add it as a seperate line.
95
+
```java
96
+
...addSectionIndicator(newCustomIndicator(this));
97
+
```
98
+
99
+
##Customisation Options
100
+
101
+
The following are various methods that you can invoke to customise the behaviour of the library.
102
+
103
+
####setHideDuration(int hideDuration)
104
+
105
+
**Default:** 2500
106
+
107
+
Use this to alter the hide duration of the bar. Only has effect if autoHide is true.
Use this to alter the colour of the handle. If lightOnPress is true, this affects the lit colour.
114
+
115
+
####setHandleOffColour(String|int colour)
116
+
117
+
**Default:** Dark grey
118
+
119
+
Use this to alter the colour of the handle when unpressed. Only effective if lightOnPress is true.
120
+
121
+
####setBarColour(String|int colour)
122
+
123
+
**Default:** Light grey
124
+
125
+
Use this to alter the colour of the bar's background.
126
+
127
+
####setTextColour(String|int colour)
128
+
129
+
**Default:** White
130
+
131
+
Use this to alter the colour of text in the indicator. Useful if the background is unusually light and the text needs to be darkened.
132
+
133
+
####setAutoHide(Boolean autoHide)
134
+
135
+
**Default:** True
136
+
137
+
Use this to change whether the bar should deploy and hide as motion occours (true) or if it should always be present (false).
90
138
91
139
Versioning Policy
92
-
-------
140
+
======
93
141
94
142
All versions have 3 nodes (X.X.X). The first increments every time that an application written for the previous version might be rendered incompatibile with the new version. This occurs whenever a feature's implementation must be changed on the developer's end to continue working. The second node changes whenever a new feature is added or previous features are updated, without breaking any code which was written for the previous version. The last node changes for bugfixes or dependancy updates.
0 commit comments