📅  最后修改于: 2022-03-11 14:55:33.077000             🧑  作者: Mango
TabLayout tabLayout = findViewById(R.id.tabLayout);
tabLayout.addTab(tabLayout.newTab().setText("Bar"));
tabLayout.addTab(tabLayout.newTab().setText("Foo"));