I want to pass the arguments from my activity to the fragment embedded in the action. The snippet is statically embedded in the xml layout. I tried calling setArgument () as follows:
setContentView(R.layout.detail_activity); DetailFragment detailFragment = (DetailFragment) getFragmentManager().findFragmentById(R.id.detailFragment); detailFragment.setArguments(getIntent().getExtras());
but it's too late, because setArguments needs to be called right after the fragment is created. The only thing I saw was getArguments () and a package change. Any better way?
android android-activity android-fragments
damluar Aug 08 '13 at 10:51
source share