Android Design Support Library - android

I have found this after a google search about the android design support library.
It states: "Android Design Support Library brings a number of material design components that are compatiable [sic] with all Android 2.1 or higher devices."
I am wondering if this means that the android design support library should only be used with pre-lollipop devices or if it is the same thing as using material design in api-21 now.
Thanks for your help!

The Design Support Library only provides some components introduced by Material Design.
To use the Material Design theme, you have to use AppCompat Support Library (or set your minSdkVersion to 21 or higher).
So even if you are developing for API 21+, you still won't have access to those components (Floating Action Button, Snackbar, NavigationView, ...), as they are not included in Android.
You can get more information about the Design Support Library in the official announcement.

Related

NativeScript: Instructions on how to use Material Design on Android <5

How to use Material Design on Android < 5? I added app.gradle to app/App_Resources/Android. This is what I have in there:
dependencies {
compile "com.android.support:appcompat-v7:21.0.+"
compile "com.android.support:design:23.2.1"
}
But still no luck getting Material Design slider and textfield. Could someone give precise instructions on how to add Material Design in NativeScript apps. Better a link to a repo with an example. Especially I'm interested in slider and textfield elements. Thanks.
Based on the guidance in developer.android.com here :
To use material design in your Android apps, follow the guidelines defined in the material design specification and use the new components and functionality available in Android 5.0 (API level 21) and above.
So basicly the native API is supporting Material design with version 5 and above so you can't implement it on lower versions.
Check also this link for further information about maintaining compatibility in different android versions.
EDIT: There are many plugins that are bringing material-design functionallity in NativeScript (for example cardview) - however notice that material design is more concept based on different rules so one technique can be considered material desing if used in place and anti-material if used wrong..

In Android, how can I use TextInputLayout and Snackbar without the Design Support Library

I am developing a new Android project with a minimum SDK set at 5.0. I want to use material design, but it seems like many of the material design components are only included in the support library. I really want to theme the app as Material, not AppCompat.
When I try to add a layout from the support library, I get an error every time. What do I need to do to remove the support library dependencies?
The Snackbar is only available in the design support library - it is not baked into versions of Android like EditText/ImageView views.

Implement material design in android 5.0 and lower

I want to use Material Design in different devices including(i.e) Android 5.1 and Android 4.4.2.
So, after 5.0 android uses Material by default. But what about other devices?
Where I can get samples of such project? How to implement Button, side K and FAB.
Actually, what is the best and common way to implement material? I know that there are some libs to handle my task, but maybe there is the better way.
Please help me to figure out this issue.
Thanks.
You have to use AppCompat Library v21 for Material Design in Pre-Lollipop Device.
http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html
Additional, want to include ActionButton, Collapsible Toolbar, Floating EditText etc. are available with Design Support Library by Android Developers.
http://android-developers.blogspot.com/2015/05/android-design-support-library.html
You can use the AppCompact support library for that.
http://android-developers.blogspot.in/2014/10/appcompat-v21-material-design-for-pre.html

Material theme backwards compatibility [duplicate]

From examples provided on the Android Developer pages I see that new Views, like the RecyclerView, are backward compatible (android.support.v7.widget.RecyclerView).
Are all the new things introduced in Material Design backward compatible (to which version)?
Updating this answer as Lollipop OS is officially released with support libraries, which you can use inside your project to provide compatibility to older versions.
Support library: v7 appcompat library
This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations.
If you are using Android Studio then you just need to include below dependency identifier:
com.android.support:appcompat-v7:21.0.+
Material Design from Android 2.2 (API 8) to present 5.0 (API 21)
Here is what you need:
Toolbar
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..
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?
.
Happy coding ;)
Officialy the Material Design is backwards to the v7 appcompat Support Library.
Just to add on to Paresh's answer, not all the features of Material Design are available on older releases. Custom themes and activity transitions are only available for APIs > 21, however as others mentioned some of the features are available in support library.
https://developer.android.com/training/material/compatibility.html
The API is included since version 22. You need include this dependency in to gradle dependency:
com.android.support:design:22.2.0
Google design support library introduced in I/O 2015
http://android-developers.blogspot.gr/2015/05/android-design-support-library.html
You will find a lot of good stuff for material design there.
Navigation View
Snackbar
Floating Action Button
CoordinatorLayout, motion, and scrolling (the best part wich include parallax effect and pinned toolbars)
and much more ...

Material Design backward compatibility

From examples provided on the Android Developer pages I see that new Views, like the RecyclerView, are backward compatible (android.support.v7.widget.RecyclerView).
Are all the new things introduced in Material Design backward compatible (to which version)?
Updating this answer as Lollipop OS is officially released with support libraries, which you can use inside your project to provide compatibility to older versions.
Support library: v7 appcompat library
This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations.
If you are using Android Studio then you just need to include below dependency identifier:
com.android.support:appcompat-v7:21.0.+
Material Design from Android 2.2 (API 8) to present 5.0 (API 21)
Here is what you need:
Toolbar
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..
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?
.
Happy coding ;)
Officialy the Material Design is backwards to the v7 appcompat Support Library.
Just to add on to Paresh's answer, not all the features of Material Design are available on older releases. Custom themes and activity transitions are only available for APIs > 21, however as others mentioned some of the features are available in support library.
https://developer.android.com/training/material/compatibility.html
The API is included since version 22. You need include this dependency in to gradle dependency:
com.android.support:design:22.2.0
Google design support library introduced in I/O 2015
http://android-developers.blogspot.gr/2015/05/android-design-support-library.html
You will find a lot of good stuff for material design there.
Navigation View
Snackbar
Floating Action Button
CoordinatorLayout, motion, and scrolling (the best part wich include parallax effect and pinned toolbars)
and much more ...

Categories

Resources