mirror of
https://github.com/accelforce/Yuito
synced 2024-12-23 13:58:36 +01:00
parent
cfea5700b0
commit
41d493e72a
@ -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 New Issue
Block a user