Skip to content

TitleBar (or custom ActionBar) with immersive status bar and scroll animation like tumblr app (icon and text color gradually change to end color).

License

Notifications You must be signed in to change notification settings

xiangtailiang/InterestingTitleBar

 
 

Repository files navigation

InterestingTitleBar GitHub release

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

About

TitleBar (or custom ActionBar) with immersive status bar and scroll animation like tumblr app (icon and text color gradually change to end color).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%