-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5771b8b
commit 37b8ca0
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ToolBarAlphaBehavior | ||
================== | ||
|
||
Android - ToolBarAlphaBehavior | ||
|
||
## Demo | ||
|
||
 | ||
|
||
|
||
## 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); | ||
} | ||
}); | ||
``` | ||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.