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).
Related
With the number of users moving to 7+ android version, is AppCompat still necessary or can I use the new libraries instead. This is specially related to styling. I want to switch to the Material design library for styling. What i'm asking is, is it recommend to use the new Material design library versus AppCompat?
The Material Design Components are built on top of AppCompat, so while you may use Material styles in place of AppCompat, you still need AppCompat under the hood to provide a consistent base across all API levels. This also means you need to continue to extend AppCompatActivity, etc.
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
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
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!!
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