I need help so I have a fragment which has a RecycleView
and inside the RecycleView
there is a button.
The button after click must open the dialog which already declared in base fragment so I only call like openDialog(DIALOG_CHECK);
Now how can I call that dialog on my adapter I already make a method in fragment and call it from the adapter and make an error "Java lang null pointer"
This is my code :
DeliveryFragment delivFrag = new DeliveryFragment();
holder.editButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
delivFrag.doEdit();
}
});
And in fragment
public void doEdit(){
openDialog(DIALOG_EDIT_ITEM);
}