Skip to content

Instantly share code, notes, and snippets.

@tmaxxdd
Created March 21, 2020 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaxxdd/c4f1245921fe084dc110e7deeb5ebf70 to your computer and use it in GitHub Desktop.
Save tmaxxdd/c4f1245921fe084dc110e7deeb5ebf70 to your computer and use it in GitHub Desktop.
class ExampleActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_example)
motionLayout.setTransitionListener(MotionProgressListener { progress: Float ->
arrow.isVisible = (progress <= 0.5f)
editText.isVisible = (progress >= 0.5f)
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment