I have three ListFragment
is one activity. For the first listFragment I have created a ListFragment
and inflate a layout with some listItem easily:
setListAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, getResources.getStringArray(R.string.baal)));
The item of the second listFragment
will change according to the selected item of the first ListFragment
and in the similar way The item of the third listFragment
will change according to the selected item of the second ListFragment
.
The first ListFragment
is static as it won't depend on any other ListFragment
. So I simply inflate a layout with some item for it.
But The items of second and third listFragments
need to be changed frequently. So I need to inflate it in run-time with new listitems every time on click event. So I think the second and third LisFragment
needs to be create dynamically by inflating every-time with new list items. How can I achieve that? I am new in Fragment and I need my concept on dynamic UI clear. Thanks in advance.