我的代码创建了一个动态的可绘制对象:
private fun shareWin() {
val winner = arguments!!.getString("winner", "")
val maxLevel = 5
val winnerGraphic = WinnerGraphic(...)
congratulationsImage.setImageDrawable(winnerGraphic)
val intent = Intent(Intent.ACTION_SEND)
// put new Drawable in Intent
}
class WinnerGraphic (...) : Drawable() {
如何获取/设置此新Drawable
的URI,以便随后可以在Intent
中将其发送到另一个应用程序(例如Facebook Messenger)?