Manga in Kotlin. Expect some errors yet

This commit is contained in:
len
2016-03-13 22:06:32 +01:00
parent a87c65872c
commit f49577bc77
36 changed files with 1928 additions and 2196 deletions
@@ -0,0 +1,18 @@
package eu.kanade.tachiyomi.util
import android.support.annotation.DrawableRes
import android.support.v4.content.ContextCompat
import android.widget.ImageView
/**
* Set a drawable on a [ImageView] using [ContextCompat] for backwards compatibility.
*
* @param drawable id of drawable resource
*/
fun ImageView.setDrawableCompat(@DrawableRes drawable: Int?) {
if (drawable != null) {
setImageDrawable(ContextCompat.getDrawable(context, drawable))
} else {
setImageResource(android.R.color.transparent)
}
}