小编PKu*_*mar的帖子

如何使用 Kotlin 在 Android 中共享图像?

我想使用“Kotlin”共享位于资产文件夹中的图像。如何在 android 中实现类似的代码块:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("image/jpeg");
intent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(intent, "Share Image"));
Run Code Online (Sandbox Code Playgroud)

android kotlin kotlin-extension

1
推荐指数
1
解决办法
8706
查看次数

标签 统计

android ×1

kotlin ×1

kotlin-extension ×1