0

I am creating a simple application, where there is a login page, on logging in a Dashboard (recycler view is there with card view along with onClick()).

DashboardAdapter

        holder.itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String selected = mdList.getName();
                dashboardView.onMemberDataLoaded(selected);
                //GeneralUtils.showAlertDialog(activity, activity.getString(R.string.card_view) + " " + mdList.getName());
            }
        });
    }

Dashboard Fragment

public void onMemberDataLoaded(String memberList) {
  GeneralUtils.showAlertDialog(getActivity(), getActivity().getString(R.string.clicked_on) + " " + memberList);
    }
}

onMemberDataLoaded comes from a interface DashboardView which is implemented in Fragment

Swayangjit
  • 1,557
  • 2
  • 10
  • 17

1 Answers1

0

dashboardView is null! You can check again your XML, your findElementById, or BindView to define why it is null!

Kai Pham
  • 9
  • 3