What is the recommended way to launch a DialogFragment from a ViewModel?

前端 未结 5 1525
感情败类
感情败类 2020-12-06 06:40

I have a list objects in a Recyclerview. When long-pressing an item I want to show a dialog with data from the item clicked.

The Recyclerview

5条回答
  •  鱼传尺愫
    2020-12-06 07:30

    So you can use the context of item for example itemView.getContext() to show AlertDialog

提交回复
热议问题