Android lollipop UI in KitKat - android

I am developing an android app and I would like to have android l ui on it even for KitKat. I have seen apps like inbox and pushbullet to use this such as the rotation of the circle button and the status bar recolor. How do they do this?

Make use of the Android Support Library to maintain backwards compatibility.
According to the documentation:
The v7 Support Libraries r21 and above includes the following material
design features:
Material design styles for some system widgets when you apply one of
the Theme.AppCompat themes.
Color palette theme attributes in the Theme.AppCompat themes.
Source: https://developer.android.com/training/material/compatibility.html

Related

What is the difference between Android Material Design UI and Android UI without material design?

I am working on an android application. I am going to design User Interface and i have to use material design in it. I want to know what is the difference between Android Material Design UI and Android UI without material design ?
How should i use material design in my application.
You simply have to provide UI which fits the suggestions and rules from https://material.io/guidelines/
That resource does describe, for example, minimum sizes for UI elements, padding, margin, etc.
For the newest SDK versions of android most of these rules are already applied into default ui elements in Android Studio.
Material design is a comprehensive guide for visual, motion, and interaction design across platforms and devices. See The documentation
Material Design can be used in API Level 21 (Android 5.0) and newer or via the v7 appcompat library, which is used on virtually all Android devices.
In Material Design lot of new things were introduced like Material Theme, new widgets, custom shadows, vector drawables and custom animations
For more information Go here
There are lot of UI libraries available which you can use in your application.Find out here

Android Design Support Library

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.

Theming and AppCompat

I am new to android and have theming question.
I have project using Toolbar with AppCompat-r21, for api 14+ devices.
Does this mean that only theme i can use is "Theme.AppCompat.Light"?
No Holo, no DeviceDefault ?
Toolbars are a concept only added as part of material design - AppCompat is designed to bring consistent design across all API versions, matching material design guidelines. Therefore if you want to use a Holo theme, you should stick to using the Holo ActionBar and not use Toolbars or AppCompat.
Note that your app will look considerably out of place on newer devices as well as not match any of the Google apps (which all use a material design styling even on older versions of Android).

Backward compatibility Material Design

As Google says in this page, Material Theme is only available on Android L Developer Preview.
But how can these apps work on previous version of Android L?
https://play.google.com/store/apps/details?id=com.borggren.notes
http://officialandroid.blogspot.it/2014/10/a-new-look-for-google-play-newsstand.html
There are other apps.
Do they use some components similar to material design?
Don't they use the "android:Theme.Material"?
Or is there a way to use Material Theme on previous versions (and I am the only one who doesn't know how to do this)?
I think they are using the components not the theme itself. If you try to give this theme as your overall theme in studio without the minSDK =21 it gives you an error. They are trying to emulate the material design.
For example if you want the floating action bar you can use this project. https://github.com/FaizMalkani/FloatingActionButton
I guess he uses frame layout to emulate that button on the lower right corner. Have a look!!

How to use Holo.Theme in ActionbarSherlock?

I was using Theme.Holo as parent in my application before trying to target lower versions of Android OS. To adapt my application to older versions, I have to use ActionBarSherlock library. But it requires the theme of the application be one of ActionBarSherlock's own themes (Theme.Sherlock.Light.DarkActionBar instead of Theme.Holo).
I still need to use Theme.Holo. But it is not possible by default.
Are there any modifications done do make this happen?
Holo theme is not known to older versions of android, ActionBarSherlock defines necessary parts of Holo Style for ActionBar.
If you need to have Same look on older versions (Although it doesn't look native) you can use HoloEverywhere Library.
As an alternative you can generate Holo-Styled drawables using Android Holo Colors Generator Project

Categories

Resources