Tag: 共享意图

在android studio中使用kotlin共享意图文本

我想共享文本在我的CardView使用共享意图使用KOTLIN,但有一个问题,最后一行代码在KOTLIN代码 val shareIntent = Intent() shareIntent.action = Intent.ACTION_SEND shareIntent.putExtra(Intent.EXTRA_STREAM, “ali”) shareIntent.type = “text/plain” startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.send_to))) 这是代码中的问题 startActivity(Intent.createChooser(shareIntent, getResources().getText(R.string.send_to))) 请帮帮我 看图像来理解我 图片 https://ibb.co/jQwYXw https://ibb.co/id0tXw https://ibb.co/fbCU5G 适配器完整的代码 class MyAdapter(context: Context, listItem: ArrayList) : RecyclerView.Adapter() { var Context = context var movieList = listItem; var layoutInflator = LayoutInflater.from(context) override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): MyViewHolder { var inflateView […]