公告
财富商城
积分规则
提问
发文
2019-01-05 07:09发布
够拽才男人
How to make transparent or translucent ActionBar like Google Play that fades in or out when scrolling using windowActionBarOverlay?
windowActionBarOverlay
Check the following screenshots
Please check this library https://github.com/ManuelPeinado/FadingActionBar which implements the cool fading action bar effect that you want
On webView:
@JavascriptInterface public void showToolbar(String scrollY, String imgWidth) { int int_scrollY = Integer.valueOf(scrollY); int int_imgWidth = Integer.valueOf(imgWidth); String clr; if (int_scrollY<=int_imgWidth-actionBarHeight) { clr = Integer.toHexString(int_scrollY * 255 / (int_imgWidth-actionBarHeight)); }else{ clr = Integer.toHexString(255); } toolbar.setBackgroundDrawable(new ColorDrawable(Color.parseColor("#"+clr+"9CCC65"))); }
最多设置5个标签!
Please check this library https://github.com/ManuelPeinado/FadingActionBar which implements the cool fading action bar effect that you want
On webView: