parent
cfea5700b0
commit
41d493e72a
1 changed files with 13 additions and 8 deletions
|
@ -488,18 +488,23 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidI
|
||||||
.centerCrop()
|
.centerCrop()
|
||||||
.into(binding.accountHeaderImageView)
|
.into(binding.accountHeaderImageView)
|
||||||
|
|
||||||
binding.accountAvatarImageView.setOnClickListener { avatarView ->
|
binding.accountAvatarImageView.setOnClickListener { view ->
|
||||||
val intent =
|
viewImage(view, account.avatar)
|
||||||
ViewMediaActivity.newSingleImageIntent(avatarView.context, account.avatar)
|
}
|
||||||
|
binding.accountHeaderImageView.setOnClickListener { view ->
|
||||||
avatarView.transitionName = account.avatar
|
viewImage(view, account.header)
|
||||||
val options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, avatarView, account.avatar)
|
|
||||||
|
|
||||||
startActivity(intent, options.toBundle())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
* Update toolbar views for loaded account
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue