I have the below
<?xml version="1.0" encoding="utf-8"?> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:colorControlHighlight" > <item> <shape android:shape="oval" > <solid android:color="?android:colorAccent" /> </shape> </item>
And I get this error
<ripple> requires API level 21 (current min is 11)
How to solve it?
You are using minsdk = 11.
You cannot use this drawable with api <21.
You must use different versions of this file. Put this code in res/drawable-v21/myRipple.xml and create another res/drawable/myRipple.xml
res/drawable-v21/myRipple.xml
res/drawable/myRipple.xml
Although itβs true that the tag was added in API 21, RippleDrawable is quite simple and can be moved back to API 1. There are many libraries that reverse the ripple for older devices. For an example implementation, see:
https://github.com/ZieIony/Carbon/blob/master/carbon/src/main/java/carbon/drawable/ripple/RippleDrawableFroyo.java
Source: https://habr.com/ru/post/1215804/More articles:Given the ints matrix, find the longest sequential increment snake by 1 number - algorithmNode.js and Websocket on Android Eclipse - javaBootstrap icons load locally but not on the web - cssModify with IDLE option missing from context menu - pythonFilling SignalR HubCallerContext.User from cookie cookieAuthentication from OWIN - authenticationCan I get RFC 2822 (or any) headers from email using the Outlook / Office 365 REST API? - outlook-restapiUnable to call getPosition method in google map api v3 - javascriptC ++ stores value in an unordered pair - c ++How to comment on ejs code (JS node) - javascriptWhat is wrong with the proposed template type and implicit type conversion? - genericsAll Articles