1
I created a screen with a list view based on Fragment native android studio, but I did not find solution to "call" this screen from a button.
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_camera) {
} else if (id == R.id.nav_gallery) {
} else if (id == R.id.nav_slideshow) {
} else if (id == R.id.nav_manage) {
} else if (id == R.id.nav_share) {
} else if (id == R.id.nav_send) {
}
I did not understand where the Nomedofragment goes, because I put and the error.
– Juliano Morche
Which error is presented? Give a confirmed if you are importing the v4 Fragment:
import android.support.v4.app.Fragment;
– Leonardo Dias
I have a screen with fragment that is called Jogoscampofragment. And the error when I try to import that
– Juliano Morche
But this Gameampofragment extends a Fragment?
– Leonardo Dias
Tries to change the
getSupportFragmentManager
forgetFragmentManager
– Leonardo Dias