I have 3 fragmets that I add to a viewpageradapater and then to the viewpager within a method in my MainActivity, below a piece of code: public class MainActivity extends AppCompatActivity implements FragmentCommunication { ... @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ... ViewPagerAdapter adapter = new ViewPagerAdapter(getSupportFragmentManager()); Resources res = getResources(); adapter.addFragment(new FragmentOne(), […]
The post Setting fragment id programmatically with transaction fails in Android appeared first on BlogoSfera.