“fragmento ao fragmento” Respostas de código

fragmento ao fragmento

public void onClick2(View view) {
    Fragment2 fragment2 = new Fragment2();
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    fragmentTransaction.replace(R.id.fragment1, fragment2);
    fragmentTransaction.commit();
}
Santino

fragmento ao fragmento


public void onClick2(View view) {
    Fragment2 fragment2 = new Fragment2();
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    fragmentTransaction.replace(R.id.fragment1, fragment2);
    fragmentTransaction.commit();
}

Better Bug

Respostas semelhantes a “fragmento ao fragmento”

Perguntas semelhantes a “fragmento ao fragmento”

Procure respostas de código populares por idioma

Procurar outros idiomas de código