GithubHelp home page GithubHelp logo

lsjun / interestingtitlebar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markzhai/interestingtitlebar

0.0 1.0 0.0 4.6 MB

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

License: Apache License 2.0

Java 100.00%

interestingtitlebar's Introduction

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

interestingtitlebar's People

Contributors

markzhai avatar xiangtailiang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.