Skip to content

Instantly share code, notes, and snippets.

View dadouf's full-sized avatar

David Ferrand dadouf

View GitHub Profile
class OverlayableImageView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {
private val imageView: ImageView
private val sendButton: ImageButton
init {
private val prominentThreshold = context.resources.getDimensionPixelSize(R.dimen.prominent_threshold)
// In scaleChildren:
for (i in 0 until childCount) {
val distanceToCenter = ...
child.isActivated = distanceToCenter < prominentThreshold
}
@dadouf
dadouf / keybase.md
Created June 6, 2022 15:47
Link Keybase-GitHub

Keybase proof

I hereby claim:

  • I am dadouf on github.
  • I am davidferrand (https://keybase.io/davidferrand) on keybase.
  • I have a public key ASC_UAUPovCvxb71rt6fTxbl9BzlHdVWS3-GcMxRaAk_vAo

To claim this, I am signing this object: