diff --git a/README.md b/README.md index 35ff003..48490f9 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ You can [download](https://bintray.com/ericktijerou/maven/koleton/_latestVersion ```gradle // In your module's `build.gradle.kts` dependencies { - implementation("com.ericktijerou.koleton:koleton:0.8.1") + implementation("com.ericktijerou.koleton:koleton:0.8.2") } ``` diff --git a/gradle.properties b/gradle.properties index 2928503..fd0517f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,4 +27,4 @@ compileSdk=29 groupId=com.ericktijerou.koleton vcsUrl=https://github.com/ericktijerou/koleton issueTrackerUrl=https://github.com/ericktijerou/koleton/issues -publishVersion=0.8.1 \ No newline at end of file +publishVersion=0.8.2 \ No newline at end of file diff --git a/koleton-base/src/main/kotlin/koleton/util/Views.kt b/koleton-base/src/main/kotlin/koleton/util/Views.kt index 11f0fb7..7caecf6 100644 --- a/koleton-base/src/main/kotlin/koleton/util/Views.kt +++ b/koleton-base/src/main/kotlin/koleton/util/Views.kt @@ -1,5 +1,6 @@ package koleton.util +import android.graphics.Color import android.os.Build import android.view.View import android.view.ViewGroup @@ -47,6 +48,7 @@ internal fun ViewGroup.children(): List { internal fun View.generateSimpleKoletonView(attributes: Attributes): SimpleKoletonView { val parent = parent as? ViewGroup return SimpleKoletonView(context).also { + validateBackground() it.id = id it.layoutParams = layoutParams it.cloneTranslations(this) @@ -58,6 +60,10 @@ internal fun View.generateSimpleKoletonView(attributes: Attributes): SimpleKolet } } +internal fun View.validateBackground() { + if (this is FrameLayout) setBackgroundColor(Color.TRANSPARENT) +} + internal fun RecyclerView.generateRecyclerKoletonView(attributes: RecyclerViewAttributes): RecyclerKoletonView { val parent = parent as? ViewGroup return RecyclerKoletonView(context).also {