The Android tab indicator does not move when sliding, but moves when selecting
                                        
                    •
                    Android                                    
                I have a main activity with three tabs that don't move when I slide the tabbed indicator, but when I select a tab, the layout changes, the indicator moves, and the layout changes
resolvent:
Ensure that you have attached onpagechangelistener to viewpager
mViewPager.setOnPagechangelistener(
            new ViewPager.SimpleOnPagechangelistener() {
                @Override
                public void onPageSelected(int position) {
                    mTabs.getTabAt(position).select();
                }
            });
                            The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
                        
                                            
                        THE END
                    
                    
                    
                                                        二维码
                        
                        
                                                
                        