0

I need to call a method from a fragment and also pass a string value as a parameter. But I am getting NullPointerException and it's showing currenttodat is static content.On the internet i have got only how to call a method from the fragment.But i need to pass a parameter along with it.While passing parameter i am getting the nullpointer exception.

 Calendar calendar = Calendar.getInstance();
    calendar.add(Calendar.DAY_OF_YEAR, count);
    currenttoday = dateFormat.format((calendar.getTime()));
    tv_date.setText(currenttoday);
    Toast.makeText(LandingActivity.this, currenttoday, Toast.LENGTH_SHORT).show();

    ManageCustomersFragment manageCustomersFragment = (ManageCustomersFragment) getSupportFragmentManager().findFragmentByTag("managecustomerTag");

    manageCustomersFragment.getApplicationList(currenttoday);
Srikanth G
  • 461
  • 1
  • 4
  • 11

0 Answers0