-1

some messages in Logcat are:

  1. Could not find class android.graphics.drawable.RippleDrawable, referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering

  2. tid 22118: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)

The app runs fine in a kitkat emulaor but not on a kikat device. It also run on a lollipop device but not on a kitkat device.

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

1

RippleDrawable is introduced in API 21 and it is not backward compatible meaning the devices running on Android before Lollipop can not have RippleDrawable.

However there are certain library which can mimic the ripple effect quite excellently. Refer to this github project : https://github.com/ozodrukh/RippleDrawable

Also i suggest you to refer Android Developer https://developer.android.com/develop/index.html

If you don't wish to use library you can always check the device version and act accordingly.

if(Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP){

// pre-lollipop
}else {

//after lollipop.
}

or you can define the drawable sepeartely for prelollipop and above lollipop.

drawable-v21 is for lollipop and above lollipop.
drawable is for prelollipop.

use the same name of the drawable and pu it in according to the Android version.

Aman Verma
  • 3,155
  • 7
  • 30
  • 60