How to create ripple effect in simple layout

Set these properties on your layout (if your layout has the default white/light background): android:clickable=”true” android:focusable=”true” android:background=”?attr/selectableItemBackground” You don’t need a custom drawable in this case. However, if your layout has a black/dark background, you’d have to create your own ripple drawable like this one: <?xml version=”1.0″ encoding=”utf-8″?> <!– An white rectangle ripple. –> <ripple … Read more

Add ripple effect to my button with button background color?

Here is another drawable xml for those who want to add all together gradient background, corner radius and ripple effect: <?xml version=”1.0″ encoding=”utf-8″?> <ripple xmlns:android=”http://schemas.android.com/apk/res/android” android:color=”@color/colorPrimaryDark”> <item android:id=”@android:id/mask”> <shape android:shape=”rectangle”> <solid android:color=”@color/colorPrimaryDark” /> <corners android:radius=”@dimen/button_radius_large” /> </shape> </item> <item android:id=”@android:id/background”> <shape android:shape=”rectangle”> <gradient android:angle=”90″ android:endColor=”@color/colorPrimaryLight” android:startColor=”@color/colorPrimary” android:type=”linear” /> <corners android:radius=”@dimen/button_radius_large” /> </shape> </item> </ripple> Add … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)