Hello, I have a problem, my toolbar is repeating every time I add a new registry.
HowdoIsolveit?followthecodes:
publicclassListarReportesextendsBaseActivity{Usuariousuario;RepositorioReporterepositorioReporte;RecyclerViewrecyclerView;ReportListAdapteradapter;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.recycler_view);Toolbartoolbar=(Toolbar)findViewById(R.id.toolbar_listar_reportes);if(toolbar!=null){setSupportActionBar(toolbar);getSupportActionBar().setDisplayHomeAsUpEnabled(true);getSupportActionBar().setCustomView(R.layout.teste);}//Recuperasessaodousuariousuario=(Usuario)getIntent().getSerializableExtra("usuario");
recyclerView = (RecyclerView) findViewById(R.id.rv);
recyclerView.setHasFixedSize(true);
LinearLayoutManager llm = new LinearLayoutManager(this);
recyclerView.setLayoutManager(llm);
recyclerView.setItemAnimator(new DefaultItemAnimator());
repositorioReporte = new RepositorioReporte(this);
List<Reporte> reporte = repositorioReporte.listaQuery(usuario.getId());
adapter = new ReportListAdapter(reporte);
recyclerView.setAdapter(adapter);
}
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/rv"
/>