use of org.odk.collect.android.adapters.DeleteFormsTabsAdapter in project collect by opendatakit.
the class DeleteSavedFormActivity method setUpViewPager.
private void setUpViewPager() {
String[] tabNames = { getString(R.string.data), getString(R.string.forms) };
ViewPager2 viewPager = findViewById(R.id.viewPager);
TabLayout tabLayout = findViewById(R.id.tabLayout);
viewPager.setAdapter(new DeleteFormsTabsAdapter(this, viewModel.isMatchExactlyEnabled()));
new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> tab.setText(tabNames[position])).attach();
}
Aggregations