Giter VIP home page Giter VIP logo

carbon's Introduction

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!

Do you plan to offer your Material elements as separate modules? I would prefer not to include the whole project only to use ripples.

I thought about it, but it's not that easy, because almost everything is tightly integrated with other components. For example the ripple. Due to clipping issues in Android < 5.0 it's not possible to draw borderless backgrounds just by setting the background drawable. That's why I would have to export the ripple with all layouts only to make the borderless mode work.

If you wish, you can copy RippleDrawable.java to your project and integrate it with your code manually.

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

carbon's People

Contributors

zieiony avatar

Watchers

James Cloos avatar Ritesh Kumar 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.