Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created March 23, 2018 22:17
Show Gist options
  • Save adrianhall/8e4f96d74ba5fe42d0d98b1ebc1dca27 to your computer and use it in GitHub Desktop.
Save adrianhall/8e4f96d74ba5fe42d0d98b1ebc1dca27 to your computer and use it in GitHub Desktop.
Updated the icon in the toolbar
override fun onResume() {
super.onResume()
// Determine the current auth state and place the right icon in the ImageView
if (AWSProvider.identityManager.isUserSignedIn)
mainToolbarLockIcon.setImageResource(R.drawable.ic_locked_24dp)
else
mainToolbarLockIcon.setImageResource(R.drawable.ic_unlocked_24dp)
mainToolbarLockIcon.isClickable = true
mainToolbarLockIcon.isFocusable = true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment