I want to replace a ListView
item with a Fragment
when certain conditions are met, but the View
, inside which I want to add it has no id (i.e. view's getId()
returns 0xffffffff
)
View view = lv.getChildAt(pos);
FragmentManager fm = ((PagerAdapter)getAdapter()).getItem(getCurrentItem()).getChildFragmentManager();
fm.beginTransaction().add(view.getId(), new AddPlaylistItemFragment()).commit();
view
is a LinearLayout
if it helps.
Any ideas on how to solve this
E/AndroidRuntime(1731): android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffff
error?