我需要从片段调用方法,并将字符串值作为参数传递。但是我得到NullPointerException并且它显示currenttodat是静态内容。在互联网上我只有如何从片段调用方法。但是我需要传递一个参数和它。虽然传递参数我得到了nullpointer异常。
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);