im new in android im creating an app and i have a problem with a listfragment, because the list its showing but its overlapping the title bar(i had to add margin top to change t
your problem is your setting your list fragment to the whole view Id with this line
// android.R.id.content is the WHOLE screen of your Activity
transaction.add(android.R.id.content,fragmento,"fragmento");
transaction.commit();
Create a FrameLayout in your content_drawer_principal.xml:
then do:
transaction.add(R.id.list_content,fragmento,"fragmento");
transaction.commit();
UPDATE
The real problem here is that your telling your FragmentTransaction to load your FragmentoPrincipalChofer
into android.R.id.content
which is a reserved id
android.R.id.content gives you the root element of a view, without having to know its actual name/type/ID.