InterestingTitleBar

Introduction: 带滚动渐变动画(图片和文字在两种指定颜色间流畅渐变)的沉浸式标题栏。
More: Author   ReportBugs   DemoAPK   
Tags:
滚动渐变-沉浸式标题栏-

Interesting android title bar with immersive status bar and scroll animation like tumblr app (color of icon and text on title bar gradually change to end color)

Sample

Pre-requisites

  • Android SDK v8

Immersive window modes

Different from SystemBarTint project, this titlebar project doesn't require android:fitsSystemWindows="true", and it does all padding work for you.

Usage

You may check the demo activity to see its usage, but nomally:

CustomTitleBar bar = (CustomTitleBar) findViewById(R.id.title_bar);
bar.setTitleTextView((TextView)bar.findViewById(R.id.bar_title));
bar.setTransparentEnabled(true, 100, 600);
bar.setTitle("DemoActivity");
bar.setTextShadowColor(getResources().getColor(R.color.bar_title_text_shadow));
bar.addViewToFadeList(findViewById(R.id.bar_left_button));
bar.addViewToFadeList(findViewById(R.id.bar_right_button));
bar.addViewToFadeList(findViewById(R.id.bar_title));

What if fitsSystemWindows is true (should set clipToPadding to false)

bar.setTitleBarFitsSystemWindows(true);

The bar will do drawing of shadow on status bar for you.

TODO

  1. More animation.
  2. Better support for immersive mode.
  3. Material design support.

Screenshots

Transparent Turn to opaque Transparent listview Turn to opaque

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools