Skip to content

Commit

Permalink
add readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinxu007 committed Feb 22, 2017
1 parent 5771b8b commit 37b8ca0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ToolBarAlphaBehavior
==================

Android - ToolBarAlphaBehavior

## Demo

![ToolBarAlphaBehavior GIF](./blobs/demo.gif)


## How to Use

```groovy
int imageViewHeight=dip2px(360);
//toolBar变色回调
toolBarAlphaBehavior = new ToolBarAlphaBehavior(getBaseContext(),toolbar, "000000", new ToolBarAlphaBehavior.CallBack() {
@Override
public void callBack(int color) {
setStatuBarColor(color);
}
},imageViewHeight);
//初始化toolBar 颜色
toolBarAlphaBehavior.setAlPha(ToolBarAlphaBehavior.minAlpha);//toolbar透明度初始化
//监听 NestScrollView
mScrollView.setOnCustomScroolChangeListener(new CustomNestedScrollView.ScrollInterface() {
@Override
public void onSChanged(int l, int t, int oldl, int oldt) {
//渐变色.
if (toolBarAlphaBehavior != null)
toolBarAlphaBehavior.onNestedScroll(t);
}
});
```




Binary file added gif/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 37b8ca0

Please sign in to comment.