You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val imageView = findViewById<ImageView>(R.id.image)
val shimmer = Shimmer.ColorHighlightBuilder()
.setBaseColor(ContextCompat.getColor(this, R.color.skeleton_mask))
.setBaseAlpha(1f)
.setHighlightAlpha(1f)
.setHighlightColor(ContextCompat.getColor(this, R.color.skeleton_shimmer))
.setDuration(2000)
.setDirection(Shimmer.Direction.LEFT_TO_RIGHT)
.setAutoStart(true)
.build()
val shimmerDrawable = ShimmerDrawable()
shimmerDrawable.setShimmer(shimmer)
imageView.setImageDrawable(shimmerDrawable)
}
}
Results in:
As i can see the reason is that CardView uses RoundedCornerDrawable underneath and when we place our ShimmerDrawable over it, PorterDuff.Mode.SRC_IN clears corner pixels (and because of it they are black)
The text was updated successfully, but these errors were encountered:
Hi @qoswa !
I am a new open source contributor and would like to solve this issue, could you help me understand the issue better by providing some extra references ?
Is this is issue open to contribute ?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment: Android emulator, Nexus 5 Api 25
Layout:
Activity:
Results in:
As i can see the reason is that CardView uses RoundedCornerDrawable underneath and when we place our ShimmerDrawable over it, PorterDuff.Mode.SRC_IN clears corner pixels (and because of it they are black)
The text was updated successfully, but these errors were encountered: