Resources$NotFoundException: Resource ID #0x0 in AlertDialog

后端 未结 3 1290
没有蜡笔的小新
没有蜡笔的小新 2020-12-31 02:36

I have a RecyclerView, and in its adapter, I have created something similar to an OnLongClickListener, which I am calling an OnEntryLongClick

3条回答
  •  温柔的废话
    2020-12-31 03:05

    Pass your context correctly by casting it to Activity if you are calling from a Fragment.

    In Kotlin,

     AlertDialog.Builder(context as HomeActivity)
    

提交回复
热议问题