Nick
Nick

Reputation: 3494

Material Design support library

Are there efforts underway to backport the new Material Design style and widgets to pre-L versions of Android, similar to the "HoloEverywhere"-library? The creator of that library has initialized an empty GitHub-repository, but it doesn't seem to be in active development. I know there is a backport of L-style dialogs and the floating action button, but there are obviously so many more widgets that have changed in Android L.

Has the Android team made any announcement whether they are working on a support library (exceeding what's currently available)?

Upvotes: 7

Views: 3651

Answers (3)

Alex Facciorusso
Alex Facciorusso

Reputation: 2408

The new Android Design Support Library is the way. Just add this to your Gradle file:

compile 'com.android.support:design:22.2.0'

Upvotes: 3

Inoy
Inoy

Reputation: 1075

Here is complex answer for you

Material Design from Android 2.2 (API 8) to present 5.0 (API 21)

Here what you need:

  1. Toolbar
  2. Material Design Library for widgets (buttons, checkboxes, etc)

1. Toolbar

Just get the idea and you ready to go.

<android.support.v7.widget.Toolbar
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?attr/colorPrimaryDark"/>

Setup guide: http://antonioleiva.com/material-design-everywhere/

Source with example: https://github.com/antoniolg/MaterialEverywhere

To make Toolbar work lower API 11 use Theme.AppCompat.Light.NoActionBar (instead windowActionBar set to false)

<style name="NoActionBarTheme" parent="Theme.AppCompat.Light.NoActionBar">
     ...
</style>

2. Material Design Library

Here is Material Design Library for pretty buttons, etc.. Currently it's heavily developed.

Guide, code, example - https://github.com/navasmdc/MaterialDesignLibrary

Guide how to add library to Android Studio 1.0 - How do I import material design library to Android Studio?

.

Hope it helps :)

Upvotes: 6

Eliezer
Eliezer

Reputation: 7347

See: AppCompat V21

dependencies {
    compile "com.android.support:appcompat-v7:21.0.+"
}

Upvotes: 1

Related Questions