Skip to content

Commit

Permalink
Fixed bug where the scrollBar would not respect the height of any rec…
Browse files Browse the repository at this point in the history
…yclerView which wasn't fullscreen.
  • Loading branch information
turing-tech committed Sep 5, 2015
1 parent 6ce7939 commit ccaaeee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
siteUrl = 'https://github.com/krimin-killr21/MaterialScrollBar'
gitUrl = 'https://github.com/krimin-killr21/MaterialScrollBar.git'

libraryVersion = '3.0'
libraryVersion = '3.0.1'

developerId = 'krimin-killr21'
developerName = 'Turing Technologies'
Expand All @@ -31,16 +31,16 @@ android {
defaultConfig {
minSdkVersion 7
targetSdkVersion 23
versionCode 4
versionName "3.0"
versionCode 5
versionName "3.0.1"
}
}

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

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ public MaterialScrollBar(Context context, RecyclerView recyclerView){
setId(R.id.reservedNamedId);
LayoutParams layoutParams = new LayoutParams(Utils.getDP(20, this), ViewGroup.LayoutParams.MATCH_PARENT);
layoutParams.addRule(ALIGN_PARENT_RIGHT);
layoutParams.addRule(ALIGN_TOP, recyclerView.getId());
layoutParams.addRule(ALIGN_BOTTOM, recyclerView.getId());
((ViewGroup) recyclerView.getParent()).addView(this, layoutParams);
recyclerView.addOnScrollListener(scrollListener);
this.recyclerView = recyclerView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public SectionIndicator(Context context, MaterialScrollBar materialScrollBar) {

LayoutParams layoutParams = new LayoutParams(Utils.getDP(100, this), ViewGroup.LayoutParams.MATCH_PARENT);
layoutParams.addRule(ALIGN_RIGHT, materialScrollBar.getId());
layoutParams.addRule(ALIGN_TOP, materialScrollBar.getId());
layoutParams.addRule(ALIGN_BOTTOM, materialScrollBar.getId());
((ViewGroup)materialScrollBar.getParent()).addView(this, layoutParams);
}

Expand Down

0 comments on commit ccaaeee

Please sign in to comment.