Skip to content

Commit

Permalink
Merge pull request #6 from ericktijerou/bugfix/original-lparams
Browse files Browse the repository at this point in the history
Fix original layout params
  • Loading branch information
ericktijerou authored Jul 15, 2020
2 parents 9568013 + 29d0bb8 commit d3d9368
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.1")
implementation("com.ericktijerou.koleton:koleton:0.7.2")
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.1
publishVersion=0.7.2
3 changes: 2 additions & 1 deletion koleton-base/src/main/kotlin/koleton/MainSkeletonLoader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ internal class MainSkeletonLoader(
override fun hide(view: View, koletonView: KoletonView) {
koletonView.hideSkeleton()
val skeletonView = koletonView as ShimmerFrameLayout
val originalParams = skeletonView.layoutParams
val originalParent = skeletonView.getParentViewGroup()
skeletonView.removeView(view)
originalParent.removeView(skeletonView)
originalParent.addView(view)
originalParent.addView(view, originalParams)
}

private fun generateKoletonView(skeleton: Skeleton): KoletonView {
Expand Down

0 comments on commit d3d9368

Please sign in to comment.