Skip to content

Commit ccaaeee

Browse files
committed
Fixed bug where the scrollBar would not respect the height of any recyclerView which wasn't fullscreen.
1 parent 6ce7939 commit ccaaeee

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

lib/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
siteUrl = 'https://github.com/krimin-killr21/MaterialScrollBar'
1414
gitUrl = 'https://github.com/krimin-killr21/MaterialScrollBar.git'
1515

16-
libraryVersion = '3.0'
16+
libraryVersion = '3.0.1'
1717

1818
developerId = 'krimin-killr21'
1919
developerName = 'Turing Technologies'
@@ -31,16 +31,16 @@ android {
3131
defaultConfig {
3232
minSdkVersion 7
3333
targetSdkVersion 23
34-
versionCode 4
35-
versionName "3.0"
34+
versionCode 5
35+
versionName "3.0.1"
3636
}
3737
}
3838

3939
dependencies {
4040
compile fileTree(include: ['*.jar'], dir: 'libs')
4141
compile 'com.nineoldandroids:library:2.4.0'
4242
compile 'com.android.support:recyclerview-v7:23.0.0'
43-
compile 'org.apache.commons:commons-lang3:3.0'
43+
compile 'org.apache.commons:commons-lang3:3.4'
4444
}
4545

4646
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ public MaterialScrollBar(Context context, RecyclerView recyclerView){
123123
setId(R.id.reservedNamedId);
124124
LayoutParams layoutParams = new LayoutParams(Utils.getDP(20, this), ViewGroup.LayoutParams.MATCH_PARENT);
125125
layoutParams.addRule(ALIGN_PARENT_RIGHT);
126+
layoutParams.addRule(ALIGN_TOP, recyclerView.getId());
127+
layoutParams.addRule(ALIGN_BOTTOM, recyclerView.getId());
126128
((ViewGroup) recyclerView.getParent()).addView(this, layoutParams);
127129
recyclerView.addOnScrollListener(scrollListener);
128130
this.recyclerView = recyclerView;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public SectionIndicator(Context context, MaterialScrollBar materialScrollBar) {
6666

6767
LayoutParams layoutParams = new LayoutParams(Utils.getDP(100, this), ViewGroup.LayoutParams.MATCH_PARENT);
6868
layoutParams.addRule(ALIGN_RIGHT, materialScrollBar.getId());
69+
layoutParams.addRule(ALIGN_TOP, materialScrollBar.getId());
70+
layoutParams.addRule(ALIGN_BOTTOM, materialScrollBar.getId());
6971
((ViewGroup)materialScrollBar.getParent()).addView(this, layoutParams);
7072
}
7173

0 commit comments

Comments
 (0)