2
I’m looking for a popular one Listview based on two tables, one so-called category and the other subcategory, and I would like it to look something like this:
When I typed a name for Category on Edittext and click on the Add button, add in the category table and already appear dynamically as a table item, and when I click on the button to add a subcategory open a dialog for me to enter a Subcategory name and then, when I clicked on a button to add, insert in the table subcategory and dynamically appear below the related category.
onCreate da Categorialistactivity
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_categoria_list);
CategoriaDAO categoria = new CategoriaDAO(this);
List<Categoria> list = categoria.getLista();
ListView listView = (ListView) findViewById(android.R.id.list);
listView.setAdapter(new CategoriaAdapter(this, list, listView));
}
Please avoid long discussions in the comments; your talk was moved to the chat
– Maniero