6

I'm going to develop an android application in our school as a project.

I want to use the new Material Design by Google but i know its only available on Android-L Devices. Jack Underwood has recently released the calendar called "Today Calendar", which is in the Material Style and running on Kitkat and lower Devices.

I know that the Actionbar height is a bit bigger than the older one and the navigation drawer toggle has a new style. And so one ...

How do i implement that?

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
PatrickMA
  • 887
  • 9
  • 23

2 Answers2

5

Currently the Android-L contains the Material Theme which works only on Android-L release.

You can build a Material Style without this Theme. For example:

  • you can use a custom ActionBar (it is a customView) with a solid color, without shadow and with the navdrawer icon insted of standard icon app.

  • You can build a subheader bar with a LinearLayout below the actionBar with the same color.

  • You can build a Floating Action Button with a floating circle (and a shadow in png)

  • and so on...

We don't know what will be available for older releases. May be something as the new class Toolbar will be available in support library (and it will semplify the actionbar). I suggest you waiting a month.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • Thank you, Sir! But i don't know what you mean with "You can build a subheader bar with a LinearLayout below the actionBar with the same color.". Could you explain that for me, please? Best regards! – PatrickMA Oct 02 '14 at 05:37
  • @GabrieleMariotti That won't be the case with Android sdk 5.0, starting on Oct 17, 2014. – IgorGanapolsky Oct 16 '14 at 17:47
  • @IgorGanapolsky Of course. I wrote "Currently with the Android-L". I am not able to predict the future :-) – Gabriele Mariotti Oct 16 '14 at 18:31
3

appcompat v21 supports the toolbar on pre-lollipop devices as well.

You can check out Chris's blog for some help on this https://chris.banes.me/2014/10/17/appcompat-v21/

Of course, the elevation attributes does not work on pre-lollipop devices, so you need to implement custom shadow for version < 21. I would suggest a gradient drawable with height around 4dp works fine.

Sushant kunal
  • 341
  • 1
  • 2
  • 9