Just change the Adapter of your ListView. For example:
botao1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mudaLista(listaDePerguntas);
});
botao2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mudaLista(listaDeRespostas);
});
Now in your Activity, create the method that changes the list
private void mudaLista(List<Texto> lista){
listView.setAdapter(new ArrayAdapter<Texto>(this, R.layout.support_simple_spinner_dropdown_item, lista));
}
It's important to remember 2 things:
1) The Questions, Answers and Nulls classes must be daughters of the Text class. If you already have a parent in your code, use it instead of Text.
2) Your ListView has to be a field of your class, ie it has to be declared out of methods, and initialized in onCreate