android - View a ListFragment from a Fragment that's in a FragmentActivity -
android - View a ListFragment from a Fragment that's in a FragmentActivity -
i have mainactivity extends fragmentactivity implements actionbar.tablistener, have tab class extends fragment in can phone call class called manual_add extends fragment calling:
fragment manualadd = new manual_add(); fragmenttransaction transaction = getchildfragmentmanager().begintransaction(); transaction.addtobackstack("manual").replace(r.id.webview, manualadd).commit();
all works fine.
i have class called search extends listfragment implements onclicklistener, cannot page load same class can manualadd load.
i tried listfragment searcht = new search_t();
i have tried
search_data search=new search_data(); android.support.v4.app.fragmentmanager manager =getfragmentmanager(); fragmenttransaction transaction=manager.begintransaction(); transaction.replace(r.id.webview, search); transaction.commit();
but error on transaction.replace(r.id.webview, search);
you need utilize getchildfragmentmanager()
in first fragment.
android android-fragments android-listfragment
Comments
Post a Comment