如何降低viewpager2中水平滚动的灵敏度?
这是目前我的 viewpager 代码。
viewPager = findViewById(id.view_pager);
viewPager.setAdapter(new ViewPagerAdapter(this, dataManager, USERNAME));
tabLayout.setSelectedTabIndicatorColor(ContextCompat.getColor(this, R.color.green));
new TabLayoutMediator(tabLayout, viewPager,
new TabLayoutMediator.TabConfigurationStrategy() {
@Override
public void onConfigureTab(@NonNull TabLayout.Tab tab, int position) {
tab.setText(tabNames.get(position));
}
}).attach();
Run Code Online (Sandbox Code Playgroud)