Skip to content

Commit 7fee8de

Browse files
committed
Version 12.3.5
- Fixes #88.
1 parent f1ee43b commit 7fee8de

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.library'
22

3-
def libVersion = '12.3.4'
3+
def libVersion = '12.3.5'
44

55
android {
66
compileSdkVersion 25

lib/src/main/java/com/turingtechnologies/materialscrollbar/MaterialScrollBar.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public abstract class MaterialScrollBar<T> extends RelativeLayout {
8787

8888
//Misc
8989
private OnLayoutChangeListener indicatorLayoutListener;
90+
private Runnable onSetup;
9091

9192

9293
//CHAPTER I - INITIAL SETUP
@@ -102,6 +103,11 @@ public abstract class MaterialScrollBar<T> extends RelativeLayout {
102103

103104
setRightToLeft(Utils.isRightToLeft(context)); //Detects and applies the Right-To-Left status of the app
104105

106+
onSetup = new Runnable() {
107+
@Override
108+
public void run() {}
109+
};
110+
105111
generalSetup();
106112
}
107113

@@ -120,6 +126,15 @@ public abstract class MaterialScrollBar<T> extends RelativeLayout {
120126
addView(setUpHandle(context, a.getBoolean(R.styleable.MaterialScrollBar_msb_lightOnTouch, true))); //Adds the handle
121127

122128
setRightToLeft(Utils.isRightToLeft(context)); //Detects and applies the Right-To-Left status of the app
129+
130+
onSetup = new Runnable() {
131+
@Override
132+
public void run() {
133+
implementPreferences();
134+
}
135+
};
136+
137+
implementFlavourPreferences(a);
123138
}
124139

125140
//Unpacks XML attributes and ensures that no mandatory attributes are missing, then applies them.
@@ -190,7 +205,6 @@ void implementPreferences(){
190205
if(a.hasValue(R.styleable.MaterialScrollBar_msb_rightToLeft)){
191206
setRightToLeft(a.getBoolean(R.styleable.MaterialScrollBar_msb_rightToLeft, false));
192207
}
193-
implementFlavourPreferences(a);
194208
}
195209

196210
public T setRecyclerView(RecyclerView rv){
@@ -227,7 +241,7 @@ private void generalSetup(){
227241

228242
checkCustomScrolling();
229243

230-
implementPreferences();
244+
onSetup.run();
231245

232246
a.recycle();
233247

0 commit comments

Comments
 (0)