parent
cfea5700b0
commit
41d493e72a
|
@ -488,18 +488,23 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI
|
|||
.centerCrop()
|
||||
.into(binding.accountHeaderImageView)
|
||||
|
||||
binding.accountAvatarImageView.setOnClickListener { avatarView ->
|
||||
val intent =
|
||||
ViewMediaActivity.newSingleImageIntent(avatarView.context, account.avatar)
|
||||
|
||||
avatarView.transitionName = account.avatar
|
||||
val options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, avatarView, account.avatar)
|
||||
|
||||
startActivity(intent, options.toBundle())
|
||||
binding.accountAvatarImageView.setOnClickListener { view ->
|
||||
viewImage(view, account.avatar)
|
||||
}
|
||||
binding.accountHeaderImageView.setOnClickListener { view ->
|
||||
viewImage(view, account.header)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun viewImage(view: View, uri: String) {
|
||||
view.transitionName = uri
|
||||
startActivity(
|
||||
ViewMediaActivity.newSingleImageIntent(view.context, uri),
|
||||
ActivityOptionsCompat.makeSceneTransitionAnimation(this, view, uri).toBundle()
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Update toolbar views for loaded account
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue