Reference:
https://stackoverflow.com/questions/37809538/how-can-i-disable-click-on-tablayout-in-androidCode snippet:
mTabLayout = (TabLayout) findViewById(R.id.tab_layout); LinearLayout tabStrip = (LinearLayout) mTabLayout.getChildAt(0); for(int i = 0; i < tabStrip.getChildCount(); i++) { tabStrip.getChildAt(i).setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { return true; } }); }
沒有留言:
張貼留言