I have an activity which fetches the data from server and on result success, I have a parameter for fragments which I need to add dynamically.
FragmentManager fm1 = MainActivity.this.getSupportFragmentManager();
FragmentTransaction ft1 = fm1.beginTransaction();
frag = new Animal_Activity();
ft1.replace(R.id.activity_main_content_fragment, frag);
ft1.commit();
Comments
Post a Comment