null pointer exception on calling interface method implemented in other class

前端 未结 5 703
鱼传尺愫
鱼传尺愫 2020-12-21 21:59

I am trying to call the method getFailureDialog() of the interface OnSelectedListener. The method is implemented in MainActivity.java.

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-21 22:47

    here is the source code for the OnSelectedListener. Since that is an interface, you have to initialize it using new and overriding the onSelected() method OR let your class implement this listener

提交回复
热议问题