Android tablelayout view does not appear
问题 New to android programming. I have a layout XML, to which I want to add a list (with items from a database), formatted as a table. Here's the code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.edit_cat); DatabaseHandler db = new DatabaseHandler(this); List<Category> allCategories = db.getAllCategories(); //Get the main layout from XML LinearLayout mainLayout = (LinearLayout) findViewById(R.id.edit_cat); //Create table layout for