InterestingTitleBar
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)
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
- More animation.
- Better support for immersive mode.
- Material design support.