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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -