I see some application are already supporting material design. For example the SMS app Textra supports material design. And it works fine on my KitKat. How can I use the material design on older version of android. I get error when I use this
<resources>
<!-- your app's theme inherits from the Material theme -->
<style name="AppTheme" parent="android:Theme.Material">
<!-- theme customizations -->
</style>
Is there any solution?
Well... there is a way. Here is a complex answer for you
Here what you need:
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>
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With