Skip to content

harpy2/Carbon

 
 

Repository files navigation

Android Arsenal Maven Central

Carbon

Material Design implementation for Android 2.1 and newer. This is not the exact copy of the Lollipop's API and features. It's a custom implementation of the most useful things as shown in the design specification. The library also features some additional non-standard extensions, like rounded corners for layouts or a Divider view for easy divider creation.

Circular progress indicators Text appearances

Features

  • realtime, animated shadows
  • the touch ripple
  • an elevation system (changing z order changes view rendering order)
  • rounded corners
  • SVG rendering
  • a floating action button view
  • text appearances, sizes, colors and many more useful definitions
  • roboto and roboto condensed fonts for buttons and text fields
  • predefined animation styles and visibility change animations
  • a saturation/brightness/alpha fade for ImageView
  • Divider, StatusBar and NavigationBar drag&drop view
  • dark and light themes in standard and AppCompat versions
  • a radial transition animation
  • circular progress indicators
  • CardView with read shadows and rounded corners

YouTube

Instalation

Add the following line to dependencies:

compile 'tk.zielony:carbon:0.6.2'

And these two lines to android/defaultConfig:

renderscriptTargetApi 20
renderscriptSupportModeEnabled true

In case of any problems with these check the sample app.

Sample app RecyclerView and CardView

FAQ

Why Android 2.1? Isn't 4.0 enough?

I have an old Galaxy S with Android 2.3, so I did that to support my own phone. It's also fun to push the limits. Android 2.1 should work, the code compiles, but I have never checked that.

Is it stable?

Seems like it's pretty stable. I'm testing it heavily on different devices and on real projects. There are minor problems with SVG rendering and shadow generation. Also the themes aren't perfect yet. These are the issues I know about. If you have something else, please let me know.

Are you using Lollipop's API on Lollipop devices?

No. Maybe one day.

Are you thinking about uploading the library to Maven?

Done!

Can you add [put your feature name here]?

If it's possible and reasonable, sure! Just let me know.

The shadows aren't working. It says something about the RenderScript

You have to add these lines to your android build config:

renderscriptTargetApi 20
renderscriptSupportModeEnabled true

Carbon uses RenderScript for generating shadows. Gradle doesn't support renderscript very well, so it has to be done that way.

Changelog

0.6.2
  • added CardView and a sample,
  • added a sample and a style for flat buttons,
  • fixed rounded corners in layouts
0.6.1
  • CircularProgress in and out animation,
  • shadows improvements,
  • elevation bugfix,
0.6.0
  • namespace changed to just 'carbon' - less to write in xml,
  • uploaded to Maven repository,
  • added a sample for using the new image loading animation with Picasso
0.5.2
  • added CircularProgress and a progress sample,
  • tweaked light theme a bit, now it's not only gray,
  • changed radial transition sample to show transition between a fragment and a view,
  • updated Toolbar,
  • SVGView color filter bugfixing
0.5.1
  • added dark and light AppCompat themes,
  • added a text appearance demo,
  • added touch ripples to the main list of demos,
  • changed the demo theme to light,
  • added this readme file
0.5.0
  • added dark and light themes,
  • cleaned up a bit,
  • the library is open-sourced as Carbon

About

Material Design implementation for Android 2.1+

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%