0

当我向右滑动 RecyclerView 项目时,我正在与文本共享图像,如下所示;

viewModel.shareUri.observe(viewLifecycleOwner,Observer{
        val shareIntent = Intent(Intent.ACTION_SEND);
        shareIntent.setType("image/png");
        shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
        shareIntent.putExtra(Intent.EXTRA_TEXT," "+requireContext().resources.getString(R.string.paylasimKitapAdText));
        shareIntent.putExtra(Intent.EXTRA_STREAM, it);
        startActivity(Intent.createChooser(shareIntent, view.context.resources.getString(R.string.shareLabel)));
        adapter?.notifyItemChanged(position);
    });

共享正在打开,然后我正在取消。当我再次分享后,选择器是否成倍增加?这段代码有什么问题吗?

4

0 回答 0