I'm trying to add simple button on my layout, my min api is 14, The problem is when run the app on android < 5.0 the button doesn't have any animation , How can I fix that?
I think the animation you are talking about is Ripple Effect. That is a feature of material design. And remember the official material design theme is supported for android >= 5.0.
I guess that you are using default theme. So, when you run your app on android 5.0 or above it will using material theme (with ripple effect for button). However, when you run android < 5.0, the theme now is not material theme and button doesn't have ripple effect.
For solve your problem, you need using third party libraries to apply material design to your app. Here is list of awesome ui library and you can find some libraries that help you applying material design.
The list of awesome ui library: https://github.com/wasabeef/awesome-android-ui
Related
While I was using the Material components for Android (https://material.io/develop/android/docs/getting-started/) I was forced to inherit my application theme from "MaterialComponent" instead of the classic "Theme.AppCompat" in order to make the material components work. While I was testing the application with the integrated material components, on Android 6.x.x Marshmallow I observed that there is is a strange theme for the popup items when I select a text in any of my EditTexts.
Here is an example with the actual Material theme
and here is the expected theme
Has anyone encountered the same issue before?
When I include views which are available only in support library (FAB , coordinator layout) in my layout, it throws an exception and asks me to use an AppCompat theme. But as my apps min. Sdk is 21 , I am using a Material theme and don't want to change it to AppCompat. What to do in this situation ?
How to stop using AppCompat in Android Studio?
This should be the solution for your problem
But be aware that you can't use app:… in xml, you have to use android:… if possible
And you can't use Constraint layout I think.
Why do you want to avoid AppCombat?
I am trying to use the transitions which introduced in material design in pre - lollipop apps(Min API19). I was going through http://www.google.com/design/spec/animation/meaningful-transitions.html#meaningful-transitions-visual-continuity transitions. But couldn't find how to do these transition mainly the second one on click of list item it expands the details. Can anybody help me to do this.
Thanks
You cannot use the "Material transitions" (or shared content animations) in pre-Lollipop versions, whether you're using Appcompat or not.
Check this link Custom animations
I'm going to develop an android application in our school as a project.
I want to use the new Material Design by Google but i know its only available on Android-L Devices.
Jack Underwood has recently released the calendar called "Today Calendar", which is in the Material Style and running on Kitkat and lower Devices.
I know that the Actionbar height is a bit bigger than the older one and the navigation drawer toggle has a new style. And so one ...
How do i implement that?
Currently the Android-L contains the Material Theme which works only on Android-L release.
You can build a Material Style without this Theme.
For example:
you can use a custom ActionBar (it is a customView) with a solid color, without shadow and with the navdrawer icon insted of standard icon app.
You can build a subheader bar with a LinearLayout below the actionBar with the same color.
You can build a Floating Action Button with a floating circle (and a shadow in png)
and so on...
We don't know what will be available for older releases. May be something as the new class Toolbar will be available in support library (and it will semplify the actionbar).
I suggest you waiting a month.
appcompat v21 supports the toolbar on pre-lollipop devices as well.
You can check out Chris's blog for some help on this
https://chris.banes.me/2014/10/17/appcompat-v21/
Of course, the elevation attributes does not work on pre-lollipop devices, so you need to implement custom shadow for version < 21. I would suggest a gradient drawable with height around 4dp works fine.
Is there a way to use Holo theme in android 2.3 without using actionBar with it. I tried using Holoeverywhere library but it is showing actionbarbar as well.
Also I want the Holo UI same throughout the app no matter which OS version user is on (2.3.3 and above)
Apply theme Holo.Theme.NoActionBar on activity. For decrease a memory leak you can disable abs by setting requireSherlock = false in onCreateConfig, like in demo.